You are on page 1of 1

;-----------------------------------------------------------.

586
; CPU type
;-----------------------------------------------------------.model flat
; memory of model
;---------------------- EXTERNS ----------------------------extrn
_BootMain:near
; prototype of C func
;-----------------------------------------------------------;-----------------------------------------------------------.code
; Remember the memory map-- 0x500 through 0x7bff is unused above the BIOS data a
rea.
; We are loaded at 0x500 (0x50:0)
org 0500h
main:
jmp short start
nop
;-------------------------------;
; Setup segments and stack
;
;-------------------------------;
start:
cli
xor
mov
mov
mov
mov
mov
sti

ax,
ds,
es,
ax,
ss,
sp,

ax
ax
ax
09000h
ax
0FFFFh

; clear interrupts
; null segments
; stack begins at 0x9000-0xffff

; enable interrupts
call _BootMain
ret
end MAIN

;call c function

You might also like