2007-02-20 00:25:12 +00:00
|
|
|
#
|
|
|
|
! $Source$
|
|
|
|
! $State$
|
2007-02-20 00:31:54 +00:00
|
|
|
! $Revision$
|
2007-02-20 00:25:12 +00:00
|
|
|
|
|
|
|
! Declare segments (the order is important).
|
|
|
|
|
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
|
|
|
|
.sect .text
|
|
|
|
|
|
|
|
! Writes a single byte to the console.
|
|
|
|
|
|
|
|
.define __sys_rawwrite
|
|
|
|
.extern __sys_rawwrite
|
|
|
|
|
|
|
|
__sys_rawwrite:
|
|
|
|
push bp
|
|
|
|
mov bp, sp
|
|
|
|
|
2016-11-25 19:28:41 +00:00
|
|
|
! Write to the BIOS console.
|
|
|
|
|
2007-02-20 00:25:12 +00:00
|
|
|
movb al, 4(bp)
|
|
|
|
movb ah, 0x0E
|
|
|
|
mov bx, 0x0007
|
|
|
|
int 0x10
|
2016-11-25 19:28:41 +00:00
|
|
|
|
|
|
|
! Also write to the serial port (used by the test suite).
|
|
|
|
|
|
|
|
movb ah, 0x01
|
|
|
|
xor dx, dx
|
|
|
|
int 0x14
|
|
|
|
|
2007-02-20 00:25:12 +00:00
|
|
|
jmp .cret
|
|
|
|
|