9086/system/boot_code.asm

52 lines
529 B
NASM
Raw Permalink Normal View History

.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
2023-02-24 10:08:01 +00:00
MOV CH,#0x9A
inw #0x20
CMP AX,#0xABCD
2023-02-24 10:08:01 +00:00
jz WAZZ
mov al,#'0
out byte #0xA5
2023-02-24 10:08:01 +00:00
hlt
WAZZ:
mov al,#'1
out byte #0xA5
2023-02-24 10:08:01 +00:00
hlt
TEST_:
ADD AX,#0xDEAD
RET
2023-03-14 07:20:30 +00:00
;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