9086/system/boot_code.asm

57 lines
631 B
NASM
Raw Permalink Normal View History

.ORG 0x84 ; INT 21
DW 0xFFFF ; Code Segment
DW PRINT_INT_HANDLE ; Program Counter
.ORG 0x0100
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
TEST CH,#0x70
jz WAZZ
mov ah,#2
mov dl,#'1
int #0x21
hlt
WAZZ:
mov ah,#2
mov dl,#'0
int #0x21
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,#0x0100
JMP AX