9086/system/boot_code.asm

52 lines
529 B
NASM

.ORG 0xFF00
start:
MOV SP,#STACK
MOV AX,#0x0000
MOV CX,#0x0000
MOV BX,#0x0000
CALL TEST_
ADD CX,#0xBEEF
ADD CX,#0x4111
mov AX,#0x00FF
inc AL
mov AX,#0x00FF
inc ax
ADD AX,#0x2200
MOV SI,#0x0101
MOV [SI],AX
inc [si]
inc [si]
inc [si]
dec [si]
dec cx
cmp CX,#0x00
MOV CH,#0x9A
inw #0x20
CMP AX,#0xABCD
jz WAZZ
mov al,#'0
out byte #0xA5
hlt
WAZZ:
mov al,#'1
out byte #0xA5
hlt
TEST_:
ADD AX,#0xDEAD
RET
;quick&dirty
PRINT_INT_HANDLE:
push AX
MOV AL,DL
out byte #0xA5
POP AX
iret
.BLKB 10
STACK:
.ORG 0xFFF0
MOV AX,#0xFF00
JMP AX