Make pc86 echo console output to the serial port, so qemu can pipe it to
authorDavid Given <dg@cowlark.com>
Fri, 25 Nov 2016 19:28:41 +0000 (20:28 +0100)
committerDavid Given <dg@cowlark.com>
Fri, 25 Nov 2016 19:28:41 +0000 (20:28 +0100)
stdout.

plat/pc86/README
plat/pc86/libsys/_sys_rawwrite.s

index 689c708..dcbe0ba 100644 (file)
@@ -23,6 +23,9 @@ are stubs required to make the demo apps link. File descriptors 0, 1 and 2
 represent the console. All reads block. There's enough TTY emulation to allow
 \n conversion and local echo (but it can't be turned off).
 
+Console output is echoed to the serial port (without any setup). This is used
+by qemu for running tests.
+
 
 Example command line
 ====================
index 75f75aa..ae477c6 100644 (file)
@@ -21,9 +21,18 @@ __sys_rawwrite:
        push bp
        mov bp, sp
 
+       ! Write to the BIOS console.
+
        movb al, 4(bp)
        movb ah, 0x0E
        mov bx, 0x0007
        int 0x10
+
+       ! Also write to the serial port (used by the test suite).
+
+       movb ah, 0x01
+       xor dx, dx
+       int 0x14
+
        jmp .cret
        
\ No newline at end of file