Weird MOVS bug
Memory addresses below 0x0020
seem to be vulnerable to some sort of odd bug in the MOVB
/MOVS
logic. It is demonstrated with the following:
movs $0 r2
movs 10,16 1
add r0 16
add r2 1
movs $0 r2
jdl r0 512 2a,16
In the output file system.mem
(or system.mem.bin
), one can see the address 0x0010
is not being stored. The MOVS
does initially place the value, but then it gets cleared.
-
Looks more like the
ADD
instruction is messed up.CPU up... 1000 : [ MOVS] 0011 0207 -> 0000 0000 0000 0000 0000 0002 Writing 0 to 0000 Writing 0 to 0001 1008 : [ MOVS] 0011 0200 -> 0000 0000 0000 0000 0010 0001 Writing 1 to 0010 Writing 0 to 0011 1010 : [ ADD] 0001 0201 -> 0000 0000 0000 0000 0000 0010 Writing 0 to 0010 Writing 0 to 0011
-
Bad dereference initially, plus
BasicMath
wasn't writing the registers back. -
closed
Toggle commit list -
-
Please register or sign in to post a comment