1 .globl begtext, begdata, begbss ! needed by linker
2 .globl _getc,_putc,_getcs
6 begtext
: ! text
,data
,bss segments
7 .data ! are all the same.
21 !---------------------------------------------
22 ! char getc
[] function
: returns
a char
23 !---------------------------------------------
26 int
0x16 ! call BIOS to get
a char in AX
29 !----------------------------------------------
30 ! void putc
[char c
] function
: print
a char
31 !----------------------------------------------
36 movb al
,4[bp
] ! get the char into aL
38 mov bx
,#0x000E ! bL = display page#
39 int
0x10 ! call BIOS to display the char