Skip to content

Commit

Permalink
allow selection of COM port for debug prints easily overridden during…
Browse files Browse the repository at this point in the history
… compile, e.g. build.bat /D DEBUG_PRINT_COMPORT /V 2
  • Loading branch information
PerditionC committed Feb 10, 2024
1 parent 716f732 commit 114236d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kernel/console.asm
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,14 @@ _int29_handler:
pop ax
iret
%IFDEF DEBUG_PRINT_COMPORT
%ifnum DEBUG_PRINT_COMPORT
%define DEBUG_USE_COMPORT DEBUG_PRINT_COMPORT
%else
%define DEBUG_USE_COMPORT 1 ; default to COM2 if not specified
%endif
.comprint:
push dx
mov dx, 1 ; 0=COM1,1=COM2,2=COM3,3=COM4
mov dx, DEBUG_USE_COMPORT ; 0=COM1,1=COM2,2=COM3,3=COM4

mov ah, [cs:ASYNC_NEED_INIT]
or ah,ah
Expand Down

0 comments on commit 114236d

Please sign in to comment.