NextBASIC new routines switch out the “original” ROM [til/spectrum]

In trying to blanket copy a block of the Spectrum’s ROM using PEEK$ it turns out that in using PEEK$ the ROM isn’t actually available to be copied.
This was the code:
; system font position @ 15616 / 0x3D00
%b=%15616
; using string peek because it can read variable length
f$= PEEK$ (%b,768)
; poke the contents into a new location
POKE 64000,f$
; this should have printed the ‘!’ character
PRINT PEEK 64008

This doesn’t work because when you use PEEK$ a different ROM is paged in and the memory map changes. So you’ll never be able to do it like this. Indeed this is true for all new NextBASIC routines.


This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log

In trying to blanket copy a block of the Spectrum's ROM using PEEK$ it turns out that in using PEEK$ the ROM isn't actually available to be copied.

This was the code:

; system font position @ 15616 / 0x3D00
%b=%15616
; using string peek because it can read variable length
f$= PEEK$ (%b,768)
; poke the contents into a new location
POKE 64000,f$
; this should have printed the '!' character
PRINT PEEK 64008

This doesn't work because when you use PEEK$ a different ROM is paged in and the memory map changes. So you’ll never be able to do it like this. Indeed this is true for all new NextBASIC routines.

Originally published on Remy Sharp's b:log


This content originally appeared on remy sharp's b:log and was authored by remy sharp's b:log


Print Share Comment Cite Upload Translate Updates
APA

remy sharp's b:log | Sciencx (2020-08-31T19:33:06+00:00) NextBASIC new routines switch out the “original” ROM [til/spectrum]. Retrieved from https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/

MLA
" » NextBASIC new routines switch out the “original” ROM [til/spectrum]." remy sharp's b:log | Sciencx - Monday August 31, 2020, https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/
HARVARD
remy sharp's b:log | Sciencx Monday August 31, 2020 » NextBASIC new routines switch out the “original” ROM [til/spectrum]., viewed ,<https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/>
VANCOUVER
remy sharp's b:log | Sciencx - » NextBASIC new routines switch out the “original” ROM [til/spectrum]. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/
CHICAGO
" » NextBASIC new routines switch out the “original” ROM [til/spectrum]." remy sharp's b:log | Sciencx - Accessed . https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/
IEEE
" » NextBASIC new routines switch out the “original” ROM [til/spectrum]." remy sharp's b:log | Sciencx [Online]. Available: https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/. [Accessed: ]
rf:citation
» NextBASIC new routines switch out the “original” ROM [til/spectrum] | remy sharp's b:log | Sciencx | https://www.scien.cx/2020/08/31/nextbasic-new-routines-switch-out-the-original-rom-til-spectrum/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.