2024-02-12 19:42:27 +00:00
|
|
|
MOV $FF0000,%SP
|
2024-02-14 14:22:49 +00:00
|
|
|
|
|
|
|
#Test verious instructions
|
2024-02-12 13:43:13 +00:00
|
|
|
MOV $0x0001,%R0l
|
|
|
|
MOV $0x0000,%R0h
|
2024-02-12 19:42:27 +00:00
|
|
|
MOV $0xBEEF,%R1l
|
2024-02-12 13:43:13 +00:00
|
|
|
MOV $0x0000,%R1h
|
2024-02-12 17:51:16 +00:00
|
|
|
CALL $SUBROUTINE
|
|
|
|
CALL $SUBROUTINE
|
|
|
|
CALL $SUBROUTINE
|
2024-02-12 19:42:27 +00:00
|
|
|
CALL $SUBROUTINE2
|
2024-02-12 17:51:16 +00:00
|
|
|
JMP $END
|
|
|
|
:SUBROUTINE
|
2024-02-12 19:42:27 +00:00
|
|
|
PUSH %R1
|
|
|
|
ADD %R0,%R1
|
|
|
|
POP %R1
|
|
|
|
RET
|
|
|
|
:SUBROUTINE2
|
2024-02-12 13:43:13 +00:00
|
|
|
ADD %R0,%R1
|
|
|
|
RET
|
2024-02-12 17:51:16 +00:00
|
|
|
:END
|
2024-02-14 14:22:49 +00:00
|
|
|
|
|
|
|
#Test text terminal
|
2024-02-13 22:37:36 +00:00
|
|
|
MOV $0xFFFC,%R0l
|
|
|
|
MOV $0x00FF,%R0h
|
|
|
|
MOV $0x0068,%R1l
|
|
|
|
MOV $0x0000,%R1h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0x0065,%R1l
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0x006c,%R1l
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0x006c,%R1l
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0x006f,%R1l
|
|
|
|
MOV %R1,(%R0)
|
2024-02-14 14:22:49 +00:00
|
|
|
|
|
|
|
# Test Vector Display
|
2024-02-14 02:42:10 +00:00
|
|
|
MOV $0xFFFF,%R1l
|
|
|
|
MOV $0xFFFF,%R1h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0x0000,%R1l
|
|
|
|
MOV $0x0000,%R1h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0xcccd,%R1l
|
|
|
|
MOV $0xbf4c,%R1h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0xcccd,%R1l
|
|
|
|
MOV $0xbf4c,%R1h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV $0xcccd,%R1l
|
|
|
|
MOV $0x3f4c,%R1h
|
|
|
|
MOV %R1,(%R0)
|
2024-02-14 14:22:49 +00:00
|
|
|
|
|
|
|
#Test Indirect read/writes
|
2024-02-14 02:42:10 +00:00
|
|
|
MOV $0xcccd,%R1l
|
|
|
|
MOV $0x3f4c,%R1h
|
|
|
|
MOV %R1,(%R0)
|
2024-02-14 17:15:04 +00:00
|
|
|
MOV $0xF0D0,%R0l
|
2024-02-14 14:03:03 +00:00
|
|
|
MOV $0x0000,%R0h
|
|
|
|
MOV %R1,(%R0)
|
|
|
|
MOV (%R0),%R5
|
2024-02-14 17:15:04 +00:00
|
|
|
|
|
|
|
#Test mul/div
|
|
|
|
#R1=pi
|
|
|
|
MOV $0x0fdb,%R1l
|
|
|
|
MOV $0x4049,%R1h
|
|
|
|
#R0=1.3
|
|
|
|
MOV $0x6666,%R0l
|
|
|
|
MOV $0x3fa6,%R0h
|
|
|
|
#R2=2
|
|
|
|
MOV $0x0000,%R2l
|
|
|
|
MOV $0x4000,%R2h
|
|
|
|
|
|
|
|
FMUL %R0,%R1
|
|
|
|
FDIV %R2,%R1
|
2024-02-14 02:42:10 +00:00
|
|
|
HALT
|
2024-02-14 12:57:07 +00:00
|
|
|
:TR_LOW
|
|
|
|
DDW $0xDEADBEEF
|