3 ms·
>There was a section in the paper where a function apparently ran machine code placed somewhere in data memory. I have some home computer books from the late 7
by flavio81 9y ago
>There was a section in the paper where a function apparently ran machine code placed somewhere in data memory.
I have some home computer books from the late 70s/early 80s that use this trick extensively.
On the era where home computers had only slow BASIC interpreters and no assemblers (or compilers), the usual way for speed up was to type in a long sequence of numbers (or characters) that were actually a machine language program.
So you have a line like:
1000 DATA 100,32,65,12,44,32,52,11,255,12,55,22
and on and on, which hold a sequence of bytes (the machine language program)
and later, READ statements would read each byte (of the machine language code) and POKE them into memory, that is, write it into a specific address of the RAM...
... later you CALL to that specific address, which basically instructs the BASIC interpreter to "jump" to the machine language code at that location.
- pvg 9y agoIt's not quite the same trick since this was a fairly standard use of DATA and you control the exact absolute location of the code. There are also no address space protections of any kind.