Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inc/dec memory #48

Open
ukcroupier opened this issue May 14, 2021 · 4 comments
Open

inc/dec memory #48

ukcroupier opened this issue May 14, 2021 · 4 comments

Comments

@ukcroupier
Copy link

Any chance we could use inc/dec directly on memory

eg INC &1536 instead of poke 1536,peek(1536)+1

@vitococl
Copy link

As it was said in issue #14, INC is for WORDs, so it would also include address 1537. Was that what you expected?

@ukcroupier
Copy link
Author

No, I'm not talking about variables but memory locations.

@vitococl
Copy link

Neither I do, I'm talking about a pair of memory locations, i.e. a word (16 bits). INC and DEC won't work on bytes (8 bits).

What we need is some kind of memory pointer operator, but that's another kind of request.

@dmsc
Copy link
Owner

dmsc commented Aug 9, 2021

Hi @ukcroupier

As Vitoco said, INC and DEC only work on WORD values, so applying to a memory location this would mean:

  DPOKE X, DPEEK(X) + 1

Is this what you need?

You could post a code example of the proposed usage of INC / DEC memory.

Have Fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants