home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
ASMUT-02.ZIP
/
SWITCH_1.ASM
< prev
next >
Wrap
Assembly Source File
|
1983-06-19
|
3KB
|
50 lines
;..............................................................................
; THIS IS AN ASSEMBLER PROGRAM IN '.COM' FORM.WILL NOT RUN AS .EXE .
; .
; SET UP ADDRESS FOR THE DATA USED BY THE ROM BIOS. .
; THE EQUIPMENT FLAG CAN BE CHANGED TO FOOL THE SYSTEM INTO THINKING THAT THE.
; COLOR/GRAPHICS BOARD EXITS INSTEAD OF THE MONOCHROME BOARD. .
; .
; <---------|-----------> .
; AA--DISPLAY TYPE .
; DISPLAY TYPE: 1 - COLOR CARD 40 X 25 .
; 2 - COLOR CARD 80 X 25 .
; 3 - MONOCHROME DISPLAY .
;..............................................................................
ROM_BIOS_DATA SEGMENT AT 40H
RS232_BASE DW 4 DUP(?) ;ADDRESSES OF RS232 ADAPTER
PRINTER_BASE DW 4 DUP(?) ;ADDRESSES OF PRINTER
EQUIP_FLAG DW ? ;INSTALLED HARDWARE
ROM_BIOS_DATA ENDS
;..............................................................................
; THIS IS THE START OF THE EXECUTABLE CODE. .
;..............................................................................
CSEG SEGMENT PARA 'CODE'
ASSUME CS:CSEG,DS:ROM_BIOS_DATA
ORG 100H ;Set starting point for a COM file
SWITCH: MOV AX,ROM_BIOS_DATA ;Set up data segment to point to data
MOV DS,AX
MOV DX,RS232_BASE
XOR AH,AH ;AH = 0 calls for set-mode function
MOV BX,EQUIP_FLAG ;Get the current equipment flag
MOV CX,BX ;Make a copy of the flag
AND CX,30H ;Pick off the display information
XOR BX,CX ;Erase current display information
OR BX,10H ;Set to color display, 40 x 25
MOV AL,0 ;BW 40X25 mode
CMP CX,30H ;Was it set to monochrome display?
JE S1 ;Yes, then set to BW, 40x25
OR BX,30H ;No, set to monochrome display
MOV AL,7 ;Monochrome mode
S1: MOV EQUIP_FLAG,BX ;Write flag back to memory
INT 10H ;Make request to BIOS to set display mode
INT 20H ;Return to DOS
CSEG ENDS
END SWITCH