DCPUTeam / DCPUToolchain

[ARCHIVED] The code repository for the DCPU-16 Toolchain.
http://dcputoolcha.in/
MIT License
96 stars 14 forks source link

something is wrong #211

Closed orlof closed 11 years ago

orlof commented 11 years ago

Perhaps its my miss now, but I still cant start admirals editor.

Here is the test:

IFU [val], 0xace1
  SET A, 0xfacc
IFL [val], 0xace1
  SET B, 0xfacc
:halt
  SET PC, halt

:val DAT 0

here is dtemu debug. ifl argument order looks suspicious.

0x0001: IFU NXT NXT_LIT (0xACE1)  (0x0000) 
0x0004: (skipped) SET A NXT_LIT (0xFACC) 
0x0006: IFL NXT NXT_LIT (0x0000)  (0x000C) 
0x0009: SET B NXT_LIT (0xFACC) 

in dtdb all looks good

> inspect memory 0 16
0000: 7FD7 ACE1 000C 7C01 FACC 7FD6 ACE1 000C
0008: 7C21 FACC 7F81 000A 0000 0000 0000 0000

> step
> disasm
0x0000 (0x7FD7):     IFU [0x000C], 0xACE1
0x0003 (0x7C01): >>> SET A, 0xFACC
0x0005 (0x7FD6):     IFL [0x000C], 0xACE1
0x0008 (0x7C21):     SET B, 0xFACC
0x000A (0x7F81):     SET PC, 0x000A
0x000C (0x0000):     

> step
> step
> step
> disasm
0x0000 (0x7FD7):     IFU [0x000C], 0xACE1
0x0003 (0x7C01):     SET A, 0xFACC
0x0005 (0x7FD6):     IFL [0x000C], 0xACE1
0x0008 (0x7C21):     SET B, 0xFACC
0x000A (0x7F81): >>> SET PC, 0x000A
0x000C (0x0000):     
0x000D (0x0000):     
0x000E (0x0000):     
0x000F (0x0000):     
0x0010 (0x0000):     
0x0011 (0x0000):     
0x0012 (0x0000):     
0x0013 (0x0000):     

> inspect cpu
A:   0x0000   [A]:   0x7FD7
B:   0xFACC   [B]:   0x0000
C:   0x0000   [C]:   0x7FD7
X:   0x0000   [X]:   0x7FD7
Y:   0x0000   [Y]:   0x7FD7
Z:   0x0000   [Z]:   0x7FD7
I:   0x0000   [I]:   0x7FD7
J:   0x0000   [J]:   0x7FD7
PC:  0x000A   SP:    0x0000
EX:  0x0000   IA:    0x0000
IRQ ENABLED:      false
IRQ COUNT:       0x0000
CYCLES TO SLEEP: 0x0000
orlof commented 11 years ago

wrong was the windows build that didnt update the link to the latest version...