fix virtual diskio.f_write

This commit is contained in:
Irmen de Jong
2025-07-21 20:52:11 +02:00
parent 2f90c53ad0
commit dd7adde387
2 changed files with 6 additions and 4 deletions

View File

@@ -138,8 +138,8 @@ diskio {
; you can call this multiple times to append more data ; you can call this multiple times to append more data
repeat num_bytes { repeat num_bytes {
%ir {{ %ir {{
loadm.w r0,diskio.f_write.bufferpointer loadm.w r99000,diskio.f_write.bufferpointer
loadi.b r99100,r0 loadi.b r99100,r99000
syscall 55 (r99100.b): r99100.b syscall 55 (r99100.b): r99100.b
storem.b r99100,$ff02 storem.b r99100,$ff02
}} }}

View File

@@ -11,8 +11,10 @@ Intermediate Representation instructions for the IR Virtual machine.
Specs of the virtual machine this will run on: Specs of the virtual machine this will run on:
Program to execute is not stored in the system memory, it's just a separate list of instructions. Program to execute is not stored in the system memory, it's just a separate list of instructions.
65536 virtual registers, 16 bits wide, can also be used as 8 bits. r0-r65535 100K virtual registers, 16 bits wide, can also be used as 8 bits. r0-r99999
65536 virtual floating point registers (64 bits double precision) fr0-fr65535 reserved 99000 - 99099 : WORD registers for syscall arguments and response value(s)
reserved 99100 - 99199 : BYTE registers for syscall arguments and response value(s)
100K virtual floating point registers (64 bits double precision) fr0-fr99999
65536 bytes of memory. Thus memory pointers (addresses) are limited to 16 bits. 65536 bytes of memory. Thus memory pointers (addresses) are limited to 16 bits.
Value stack, max 128 entries of 1 byte each. Value stack, max 128 entries of 1 byte each.
Status flags: Carry, Zero, Negative. NOTE: status flags are only affected by the CMP instruction or explicit CLC/SEC, Status flags: Carry, Zero, Negative. NOTE: status flags are only affected by the CMP instruction or explicit CLC/SEC,