; []===========================================================[] ; ; NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R) ; INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE ; DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED ; WRITTEN AUTHORIZATION FROM THE OWNER. ; ; []===========================================================[] ; ;---------------------------------------------------------------------------- ;Rev Date Name Description ;---------------------------------------------------------------------------- ;R04 03/17/98 RCH Changed default POST output I/O port from 300H to 80H ; According to this change, we don't need to define ; switch "SPECIAL_DEBUG_PORT" & "DEBUG_PORT" in bios.cfg ; if the I/O port 80H is used ;R03 06/06/97 PTY Add code for RPB ;R02 07/11/96 RAX Add Two_debug_PORT define for special case need out ; post code to 80h & other ;R01 OCT-15-90 SMS adding copyright stmt. ;R00 06/01/90 TIM Initial release for 4.0 ;[]-----------------------------------[] ; ; Award Software 386/486 BIOS ; POST Macros ; Initial Revision 17-Apr-1990 ; ;[]-----------------------------------[] ; ; All macros in this file are in alphabetical order... ; ;[]==============================================================[] ; ;POST_CODE: ; ; Sends a value out to the debug port (usually port 80h). ; This value can come from a register or be an immediate ; value. ; ;SAVES: All ; ;EXAMPLES: ; ; POST_CODE 40h ; ; POST_CODE bl ; ;NOTES: 1. The equate POST_STACK is used to determine whether ; or not there is any stack when the macro is used. ; If POST_STACK is not defined, AL will be destroyed. ; If POST_STACK is defined, AL will be saved. ; 2. This macro will work correctly with byte and word ; registers (except SP) ; ;Author: Tim Lewis ;Date: 17 April, 1990 ; ; Name | Date | Description ; --------------------------------------------------------------- ; TIM | 17-Apr-90 | Initial revision ; ;[]==============================================================[] ;R03 start POST_CODE_LATE MACRO VALUE ; ; If we have stack, use it... ; IFDEF POST_STACK push ax ENDIF ; ; If input is a word register, use AX rather than AL ; IFIDNI , mov ax,VALUE ELSEIFIDNI , mov ax,VALUE ELSEIFIDNI , mov ax,VALUE ELSEIFIDNI , mov al,bl ELSEIFIDNI , mov al,cl ELSEIFIDNI , mov al,dl ELSEIFIDNI , ; don't need to move anything in ELSEIFIDNI , ; don't need to move anything in ELSE mov al,VALUE ENDIF ; ifdef RPB_ENABLED ; extrn rpb_post_code:near ; call rpb_post_code ; send post code to rpb terminal ; endif ; ; Send value ; ifndef TWO_DEBUG_PORT if DEBUG_PORT EQ 80H ;R04 out 80H,al ;R04 else ;DEBUG_PORT EQ 80H ;R04 mov dx,DEBUG_PORT out dx,al endif; DEBUG_PORT EQ 80H ;R04 else ;TWO_DEBUG_PORT mov dx,DEBUG_PORT out dx,al out 80h,al endif ;TWO_DEBUG_PORT ; ; Restore saved register ; IFDEF POST_STACK pop ax ENDIF ENDM ;R03 end POST_CODE MACRO VALUE ; ; If we have stack, use it... ; IFDEF POST_STACK push ax ENDIF ; ; If input is a word register, use AX rather than AL ; IFIDNI , mov ax,VALUE ELSEIFIDNI , mov ax,VALUE ELSEIFIDNI , mov ax,VALUE ELSEIFIDNI , mov al,bl ELSEIFIDNI , mov al,cl ELSEIFIDNI , mov al,dl ELSEIFIDNI , ; don't need to move anything in ELSEIFIDNI , ; don't need to move anything in ELSE mov al,VALUE ENDIF ; ; Send value ; ifndef TWO_DEBUG_PORT if DEBUG_PORT EQ 80H ;R04 out 80H,al ;R04 else ;DEBUG_PORT EQ 80H ;R04 mov dx,DEBUG_PORT out dx,al endif; DEBUG_PORT EQ 80H ;R04 else ;TWO_DEBUG_PORT mov dx,DEBUG_PORT out dx,al out 80h,al endif ;TWO_DEBUG_PORT ; ; Restore saved register ; IFDEF POST_STACK pop ax ENDIF ENDM