[Coco] More HDB-DOS/16 goodies
Juan Castro
jccyc1965 at gmail.com
Wed Jun 4 14:06:50 EDT 2025
Well, I said I was gonna do it, and I did it. Block LPEEK and LPOKE work.
It's like DSKI$ and DSKO$, but for memory!
- LPEEK$(A, N) gets a string with the N bytes starting at A (max 255 bytes
as per string limitation)
- LPOKE A, X$ pokes all characters of X$ consecutively starting at address A
Juan Castro
Enviado do meu Olivetti Programma 101
http://retropolis.com.br
Em ter., 3 de jun. de 2025 às 20:32, Juan Castro <jccyc1965 at gmail.com>
escreveu:
> I repurposed LPOKE and LPEEK thusly: they became a 16-bit version of PEEK
> and POKE. So, instead of
>
> W=256*PEEK(A)+PEEK(A+1)
>
> you just
>
> W=LPEEK(A)
>
> Conversely, LPOKE A,X will place the MSB of X in address A and the LSB of
> X in A+1.
>
> As usual, get it at
>
> https://www.dropbox.com/scl/fo/9p5ydq5hqgp4b1fbqyyif/AKnngotPgk1PLUm6kw0nn5U?rlkey=pxtfum7dzwno0ej42bfb8ucrb&st=duyykgkj&dl=0
>
> I intend to do more LPEEK/LPOKE shenanigans. My plan:
> - LPEEK$(A, N) gets a string with the N bytes starting at A (max 255 bytes
> as per string limitation)
> - LPOKE A, X$ pokes all characters of X$ consecutively starting at address
> A
>
> Thoughts?
>
> Juan Castro
> Enviado do meu Olivetti Programma 101
> http://retropolis.com.br
>
More information about the Coco
mailing list