2019-03-24 19:24:25 +01:00
|
|
|
; assumptions about the starting envionment
|
|
|
|
cpu 8086
|
|
|
|
org 0x0000
|
|
|
|
|
|
|
|
_startup:
|
|
|
|
mov ax, cs
|
2019-03-28 00:07:04 +01:00
|
|
|
mov ss, ax
|
|
|
|
mov sp, 0x0000
|
2019-04-01 00:58:19 +02:00
|
|
|
; <0x0010 is BIOS segment when relocated to HMA
|
|
|
|
; so we need a nop sled
|
|
|
|
times (0x10 - ($-$$)) nop
|
2019-03-23 21:23:17 +01:00
|
|
|
main:
|
2019-04-10 00:38:20 +02:00
|
|
|
call intr_init
|
2019-03-31 22:54:51 +02:00
|
|
|
|
2019-04-10 00:38:20 +02:00
|
|
|
int 3
|
2019-03-31 22:54:51 +02:00
|
|
|
|
2019-04-14 21:35:55 +02:00
|
|
|
mov ah, 0x01
|
|
|
|
int 0x21
|
|
|
|
mov dl, al
|
|
|
|
mov ah, 0x02
|
|
|
|
int 0x21
|
|
|
|
|
2019-04-10 00:38:20 +02:00
|
|
|
sti
|
2019-03-28 00:07:04 +01:00
|
|
|
.halt:
|
|
|
|
hlt
|
|
|
|
jmp .halt
|
2019-03-23 21:23:17 +01:00
|
|
|
|
2019-03-24 19:24:25 +01:00
|
|
|
%include "intr.asm"
|
|
|
|
%include "debug.asm"
|
|
|
|
%include "kprintf.asm"
|
2019-04-14 21:35:55 +02:00
|
|
|
%include "dosapi.asm"
|
2019-03-24 19:24:25 +01:00
|
|
|
|
|
|
|
_reloc_end:
|
2019-03-23 21:23:17 +01:00
|
|
|
|
|
|
|
align 16
|
|
|
|
heap:
|