allow selection of COM port for debug prints easily overridden during compile, e.g. build.bat /D DEBUG_PRINT_COMPORT /V 2

This commit is contained in:
Kenneth J Davis 2024-02-10 17:36:33 -05:00
parent 716f732e3a
commit 114236da17
No known key found for this signature in database
GPG Key ID: 59D5F216C38F11FD

View File

@ -265,9 +265,14 @@ _int29_handler:
pop ax pop ax
iret iret
%IFDEF DEBUG_PRINT_COMPORT %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: .comprint:
push dx 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] mov ah, [cs:ASYNC_NEED_INIT]
or ah,ah or ah,ah