home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGASM.ZIP
/
PROG012P.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-04-16
|
821b
|
30 lines
;************************************************************************
; Setup text mode with more addressable columns (80 visible) *
; Entry: [BP+6] - Number of columns to use (80 - 255) *
;************************************************************************
PUBLIC Set_More_Columns
Set_More_Columns PROC FAR
PUSH BP
MOV BP,SP
PUSH ES
XOR AX,AX ;Get address of CRT controller
MOV ES,AX ;From segment 0
MOV DX,ES:[BIOS_CRT_Addr]
MOV AL,13H ;Index for OFFSET register
OUT DX,AL ;Select index
INC DX
MOV AX,[BP+6] ;Fetch new text line width
MOV ES:[BIOS_Columns],AX ;Let BIOS know about new width
SHR AL,1 ;Divide by 2 for OFFSET regiser
OUT DX,AL ;Set OFFSET register
POP ES ;Standard return to C
MOV SP,BP
POP BP
RET 2
Set_More_Columns ENDP