My Newest CPU with New LG1 GPU, 128 Sector RAM and 512 Flash
Flash has been improved and READ/WRITE commands are no longer necessary but are still supported.
I have also reduced the lag with the RAM clearing upon reboot. Ram now keeps a list of all edited sectors then uses that list to reset. Much faster as long as there is less than 128 STORE commands executed.
Console Output has been updated to display memory address of command executed. The console will keep a output of ALL commands executed.
There is a sample Hello World Program on flash that will boot when the computer resets. F2 does a reset of the computer and holding r for a second or two after Hello World Appears will cause the program to trigger a reset. It may take several presses of r due to KEYWAIT not always detecting the press. If someone can recommend or build a better keyboard then PLEASE let me know! This one isnt too bad but is too fast on some PCs and too slow on others.
I will setup the system in a case with floppy support soon hopefully.
Boot rom is automaticly copied into ram starting at address 0
F2 reboots system
Programs are executed from memory. When the computer starts it executes memory address 0 Which MUST contain ONE command. In this case, The first command from BOOT ROM. Boot rom MLOADS 20 sectors from flash starting at address 0 and places them in memory starting at address 5. Then a goto 5 command is executed to boot the flash program that was copied. The copied program can contain instructions to copy more programs, and os, or even just print hello world.
CPU Commands:
LOAD reg mem add Loads data from Memory address into the specified register
STORE reg memadd Reverse of LOAD
CLOAD reg cont Same as LOAD except loads from the specified controller (Flash, LX1, etc)
CSTORE reg cont
CEVAL command Executes command. Most Useful with Controllers. EX: ["CEVAL","gpu.removeBox(\"disp1\", \"test\")"]
ADD reg1 reg2 reg3 Adds reg1 and reg2 and stores the result in reg3
GOTO line Transfer to program line specified
KEY key line1 line2 Goto line1 if key is pressed else goto line2
KEYWAIT key line1 Waits for key to be pressed before going to specified line
WAIT second Waits the specified seconds before continueing execution (Uses sim.time so may be longer or shorter depending on computer performance)
NEW COMMANDS:
RESET Self explanatory. Reboots.
Please comment and Rate!