1 .globl begtext, begdata, begbss ! needed by linker
3 .globl _tswitch,_getc,_putc ! EXPORT these
4 .globl _main,_running,_scheduler,_proc,_procSize ! IMPORT these
7 begtext
: ! text
,data
,bss segments
8 .data ! are all the same.
15 mov ax
,cs
! establish segments
16 mov ds
,ax
! Let DS
,SS
,ES
= CS
=0x1000.
20 mov sp
,#_proc ! sp -> proc[0]
21 add sp
,_procSize
! sp
-> proc
[0]'s HIGH END
23 call _main ! call main() in C
25 dead: jmp dead ! loop if main() ever returns
42 RESUME: mov bx, _running
65 mov bx,#0x000B ! CYAN color