Sunday, July 9, 2017

SBTCVM Mark 2 - memory pointer support

The dev team has checked a to-do off the list today...

basic memory pointer support has been implemented. Now you may be wondering... "What does that mean?"


Well, to sum up, memory pointer support adds special memory read/write operations and a special memory pointer control operation to enable programs to iterate through large sections of memory, read and write data using a program-controlled pointer, and so on.

in addition, goto reference support has been added to setreg1 and setreg2. so now using the new ptset operation is far easier. allowing memory pointers to be set using the assembler's built-in address calculation features.


lets take a quick look at the new memory pointer assembly operations:

ptread: read to reg 1 using memory pointer 
ptwri: write to memory location using memory pointer and reg1
ptwridat: write to memory location using memory pointer and data portion of word.
ptget: copy memory pointer to CPU register 1
ptset:  set memory pointer using data from CPU register 1
ptadd: add value of CPU register 1 to memory pointer
ptinc: increase memory pointer by 1
ptdec: decrease memory pointer by 1


No comments:

Post a Comment