home *** CD-ROM | disk | FTP | other *** search
-
- ;************************************************************************
- ; Get current number of rows and columns *
- ; Entry:Rows - Pointer to number of rows *
- ; Cols - Pointer to number of columns *
- ; Exit: Values at the pointer will be set *
- ;************************************************************************
-
- row_seg EQU [BP+12]
- row_offset EQU [BP+10]
- col_seg EQU [BP+8]
- col_offset EQU [BP+6]
-
- PUBLIC Get_Rows_n_Cols
-
- Get_Rows_n_Cols PROC FAR
- PUSH BP
- MOV BP,SP
- PUSH DS
- PUSH ES ;Preserve ES
- XOR AX,AX ;Set ES to segment zero
- MOV ES,AX
- MOV DL,ES:[BIOS_Rows] ;Fetch current rows
- INC DL
- MOV DS,row_seg
- MOV BX,row_offset ;Fetch pointer
- XOR DH,DH ;Clear upper half of DX
- MOV [BX],DX ;Save number of rows
- MOV CX,ES:[BIOS_Columns] ;Fetch current columns
- MOV DS,col_seg
- MOV BX,col_offset ;Fetch pointer
- MOV [BX],CX ;Save number of columns
- POP ES
- POP DS
- POP BP
- RET 8
- Get_Rows_n_Cols ENDP
-