First/test.asm

34 lines
459 B
NASM

MOV $FF0000,%SP
MOV $0x0001,%R0l
MOV $0x0000,%R0h
MOV $0xBEEF,%R1l
MOV $0x0000,%R1h
CALL $SUBROUTINE
CALL $SUBROUTINE
CALL $SUBROUTINE
CALL $SUBROUTINE2
JMP $END
:SUBROUTINE
PUSH %R1
ADD %R0,%R1
POP %R1
RET
:SUBROUTINE2
ADD %R0,%R1
RET
:END
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)
JMP $000000