home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
asm_kit
/
switch_2.asm
< prev
next >
Wrap
Assembly Source File
|
1983-06-19
|
4KB
|
68 lines
;..............................................................................
; SWITCH2.ASM .
; .
; 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. .
; .
; <- - - - - - - - | - - - - - - - -> EQUIP_FLAG .
; ^ ^ --display type
; 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 CH,0FH ;Remove cursor by placing out of display range
MOV CL,0
MOV AH,1 ;Set cursor type, to clear cursor
INT 10H
MOV AH,6 ;Scroll screen to clear screen
MOV AL,0 ;Blank entire screen
XOR CX,CX ;Upper left corner at 0,0
MOV DL,70 ;Lower right corner at 79,24
MOV DH,24
MOV BH,07 ;Fill attributes with 7 for normal display
INT 10H ;Clear screen
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,20H ;Set to color display, 40 x 25
MOV AL,2 ;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