home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
cobol
/
compiler
/
cobol650
/
asmsrc
/
windows.asm
< prev
Wrap
Assembly Source File
|
1990-09-05
|
23KB
|
585 lines
NAME WINDOWS
.RADIX 16
;****************************************************************************
;* *
;* READ ME NOW !!!!!!!!!!!!!!! *
;* --------------------------- *
;* *
;* TWO METHODES OF ACCESSING DATA ARE SHOWN HERE. THE FIRST IS IN THE *
;* WINDOW ROUTINE, THAT MAKES USE OF THE DGROUP AREA OF THE MAIN PROGRAM *
;* TO STORE AND RETREIVE DATA. *
;* *
;* THE SECOND METHOD SHOWN IN SAVRST ROUTINE MAKES USE OF A DATA AREA *
;* INSIDE THE SAVEREST SEGMENT EITHER METHOD WORKS, IF YOU ADHERE TO *
;* THE RULES OF COMMON SENSE. *
;* *
;* I HOPE THE EXAMPLES GIVEN WILL AID YOU IN WRITTING YOUR OWN ROUTINES *
;* IN ASMB TO INTERFACE WITH THE COBOL 6.05 GENERATED PROGRAMS *
;* *
;* *
;* *
;* NOTE: WHEN PASSING DATA TO YOUR ASMB ROUTINES. 6.05 STORES CHAR. ON THE *
;* STACK STARTING AT OFFSET BP+6, AND INTEGERS ARE STORED STARTING *
;* AT OFFSET BP+6. THIS IS BECAUSE, THE CHAR ADDRESS POINTED TO BY *
;* THE VALUE IN BP+6 IS AN ADDRESS, THAT POINTS TO THE 4 BYTE VALUE *
;* TO THE START OF THE STRING. IN THE CASE OF INTEGERS BEING PASSED *
;* THE THE OFFSET OF BP+6 IS A AN ADDRESS THAT POINTES TO A 4 BYTE *
;* INTEGER WITH THE HIGH ORDER BYTES HOLDING THE LOWORDER INTEGER *
;* VALUE AS IN 1000 HEX IS REALLY 16 DEC.
;* *
;* IF I HAVE NOT TOTALLY CONFUSED YOU BY NOW THEN YOUR DOING OK AND *
;* SHOULD HAVE NO PROBLEM IN INTERFACING YOUR ROUTINES TO 6.05 *
;* *
;****************************************************************************
;****************************************************
;* *
;* DATA ADDRESS IS STORED ON THE STACK STARTING AT *
;* OFFSET 6 AND INC BY TWO FOR EACH PARM PASSED. *
;* PARMS ARE PASSED FROM LAST TO FIRST *
;* *
;****************************************************
FIRST_PARM EQU 10H
SECOND_PARM EQU 0EH
THIRD_PARM EQU 0CH
FOURTH_PARM EQU 0AH
FIFTH_PARM EQU 08H
SIXTH_PARM EQU 06H
CHAR_PARM EQU 06H
;****************************************************
;* *
;* OTHER EQUATES THAT ARE SELF EXCLAIMITORY *
;* *
;****************************************************
SAVE EQU 'S'
RESTORE EQU 'R'
MONO_DISPLAY_ADDRESS EQU 0B000H
COLOR_DISPLAY_ADDRESS EQU 0B800H
BYTES_IN_VIDEO_MEMORY EQU 07D0H
;******************************************
;VIDEO DISPLAY MODES RETURNED BY VID BIOS *
;FUNCTION 00 *
;******************************************
DISPLAY_0 EQU 0
DISPLAY_1 EQU 1
DISPLAY_2 EQU 2
DISPLAY_3 EQU 3
DISPLAY_4 EQU 4
DISPLAY_5 EQU 5
DISPLAY_6 EQU 6
DISPLAY_7 EQU 7
DISPLAY_8 EQU 8
DISPLAY_9 EQU 9
DISPLAY_10 EQU 0AH
;
;
; THE EQUATES USED BY THIS ROUTINE
;
TOP_LEFT_CORNER EQU 0C9H ; ╔
HORIZONTAL_BAR EQU 0CDH ; ═
TOP_RIGHT_CORNER EQU 0BBH ; ╗
VERTICAL_BAR EQU 0BAH ; ║
BOTTOM_LEFT EQU 0C8H ; ╚
BOTTOM_RIGHT EQU 0BCH ; ╝
SPACE EQU 020H ; SPACE
;****************************************************
;* *
;* DON'T CHANGE THE LOAD ORDER OF THE SEGMENTS OR *
;* THE GROUPS. COBOL VERSION 6.05 REQUIRES THEM *
;* TO BE IN THIS ORDER!!!! *
;* *
;****************************************************
WINDOWS SEGMENT PARA
DGROUP GROUP DSEG,IDATA,SSEG,ZZMSEG
EGROUP GROUP ESEG
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
WINDOWS ENDS
OVERLAY_AREA SEGMENT PARA PUBLIC 'CODE'
OVERLAY_AREA ENDS
DSEG SEGMENT PARA
DSEG ENDS
IDATA SEGMENT COMMON PARA 'DATA'
IDATA ENDS
SSEG SEGMENT STACK PARA 'STACK'
SSEG ENDS
ZZMSEG SEGMENT MEMORY word 'MEMORY'
ZZMSEG ENDS
ESEG SEGMENT COMMON BYTE 'CCODE'
ESEG ENDS
;****************************************************************************
;* *
;* CALLED FROM 6.05 AS: *
;* working-storage section. literal *
;* 01 WINDOW-DISCRIPTION. ______|________ *
;* 03 ROW PIC 99 COMP-0 VALUE | 0 THROUGH 20 |. *
;* 03 column pic 99 comp-0 value 0 through 72 *
;* 03 width-of-box pic 99 comp-0 value 7 through 80 *
;* 03 height-of-box pic 99 comp-0 value 6 through 20 *
;* 03 attribute pic 999 comp-0 value 0 through 255 *
;* 03 SOUND PIC 9 COMP-0 VALUE 0=OFF 1=ON *
;* *
;* call 'window' using row column width-of-box height-of-box attribute . *
;* *
;* *
;****************************************************************************
WINDOWS SEGMENT PARA
DGROUP GROUP DSEG,IDATA,SSEG,ZZMSEG
EGROUP GROUP ESEG
PUBLIC WINDOW
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
WINDOW PROC FAR
PUSH BP ;SAVE THE ENTRY POINT
MOV BP,SP
PUSH SI
push DI
push SP
push AX
push BX
push CX
PUSH DS
PUSH ES
PUSH SS
PUSH DX
MOV AH,0FH ;GET CURRENT VIDEO MODE
INT 10 ;THRU BIOS CALL
CMP AL,DISPLAY_2 ;SEE IF IT IS CGA IN MONO MODE
JZ VALID_MODE ;YES
CMP AL,DISPLAY_3 ;SEE IF IT IS CGA IN COLOR MODE
JZ VALID_MODE ;YES
MOV WORD PTR [VIDEO_ADDRESS],0B000H ;MAYBE ITS MONO
CMP AL,DISPLAY_7 ;CHECK AND SEE
JZ VALID_MODE ;YES
JMP EXIT ;NOPE EXIT THIS
VALID_MODE: MOV BYTE PTR [CURRENT_VID_MODE],AL ;SAVE CURRENT MODE
MOV BX,WORD PTR [BP+FIRST_PARM] ;GET 1 PARM ADDRESS
MOV AX,WORD PTR [BX] ;LOAD AX WITH PARM VALUE
XCHG AH,AL ;XCHANGE AH,AL
MOV BYTE PTR [ROW_POINTER],AL ;SAVE ROW
CMP AL,14 ;COMPARE TO 20 ?
JB VALID_ROW ;VALID ROW
JMP EXIT ;EXIT
VALID_ROW: MOV BX,WORD PTR [BP+SECOND_PARM] ;GET COLUMN
MOV AX,[BX] ;LOAD THE AX WITH PARM VALUE
XCHG AH,AL ;MOVE'M ROUND
MOV BYTE PTR [COLUMN_POINTER],AL ;SAVE COLUMN
CMP AL,48 ;IS COLUMN VALID
JB VALID_COLUMN ;YES
JMP EXIT ;NO EXIT
VALID_COLUMN: MOV BX,WORD PTR [BP+THIRD_PARM] ;GET WIDTH
MOV AX,[BX] ;LOAD AX WITH PARM
XCHG AH,AL ;MOVE'M ROUND
MOV BYTE PTR [WIDTH_POINTER],AL ;SAVE WIDTH
CMP AL,07 ;SEE IF VALID
JA VALID_WIDTH ;YES
JMP EXIT ;NO
VALID_WIDTH: MOV BX,WORD PTR [BP+FOURTH_PARM] ;GET HEIGHT
MOV AX,[BX] ;LOAD AX WITH PARM
XCHG AH,AL ;MOVE'M ROUND
MOV BYTE PTR [HEIGHT_POINTER],AL ;SAVE HEIGHT
CMP AL,05 ;SEE IF VALID
JA VALID_HEIGHT ;YES
JMP EXIT ;NO EXIT
VALID_HEIGHT: MOV BX,WORD PTR [BP+FIFTH_PARM] ;GET ATRIBUTE
MOV AX,[BX] ;LOAD AX WITH PARM
XCHG AH,AL ;MOVE'M ROUND
MOV BYTE PTR [ATRIBUTE_POINTER],AL ;SAVE ATRIBUTE
SOUND_ON_OFF: MOV BX,WORD PTR [BP+SIXTH_PARM] ;GET SOUND CONTROL
MOV AX,[BX] ;INTO AX
XCHG AH,AL
MOV BYTE PTR [SOUND_CONTROL],AL ;PLACE TO PUT IT
MOV WORD PTR [DURATION],0500H
MOV AL,BYTE PTR [WIDTH_POINTER] ;LOAD AL WITH WIDTH
SHR AL,1 ;DIVIDE BY 2
ADD AL,BYTE PTR [COLUMN_POINTER] ;ADD COL +(WIDTH/2) TO GET CENTER
SUB AL,02 ;SUBTRACT 2 FOR STARTING POINT
MOV BYTE PTR [INCRM_COL_PNTR],AL ;SAVE STARTING PLACE
MOV AL,BYTE PTR [HEIGHT_POINTER] ;GET TOTAL HEIGHT
SHR AL,1 ;DIVIDE BY 2
ADD AL,BYTE PTR [ROW_POINTER] ;ADD ROW +(HEIGHT/2)
DEC AL ;SUBTRACT 1 FOR STARTING POINT
MOV [INCRM_ROW_PNTR],AL ;MOVE BACK
MOV BYTE PTR [WRITE_CHAR_X_TIMES],06
MOV BYTE PTR [BYTES_MOVED],04
DO_IT_AGAIN_SAM: CMP BYTE PTR [CURRENT_VID_MODE],07
JZ RETRACE_OK
CALL CHECK_RETRACE
RETRACE_OK: CALL MAKE_BOX
CMP BYTE PTR [CURRENT_VID_MODE],07
JZ VID_CNT_OK
CALL PRG_VIA_MODE
VID_CNT_OK: CMP BYTE PTR [SOUND_CONTROL],0
JZ NO_SOUND
CALL MAKE_SOUND
SUB BYTE PTR [TONE],04
NO_SOUND: MOV AL,[COLUMN_POINTER]
CMP AL,[INCRM_COL_PNTR]
JZ COL_EQU_TEMP
ADD BYTE PTR [WRITE_CHAR_X_TIMES],02
DEC BYTE PTR [INCRM_COL_PNTR]
COL_EQU_TEMP: MOV AL,[INCRM_ROW_PNTR]
CMP AL,[ROW_POINTER]
JZ ROW_EQU_TEMP
ADD BYTE PTR [BYTES_MOVED],02
DEC BYTE PTR [INCRM_ROW_PNTR]
JMP DO_IT_AGAIN_SAM
ROW_EQU_TEMP: NOP
MOV AL,[COLUMN_POINTER]
CMP AL,[INCRM_COL_PNTR]
JNZ DO_IT_AGAIN_SAM
MOV AL,[INCRM_ROW_PNTR]
CMP AL,[ROW_POINTER]
JNZ DO_IT_AGAIN_SAM
EXIT: POP DX
POP SS
POP ES
POP DS
POP CX
POP BX
POP AX
POP SP
POP DI
POP SI
POP BP
RET 0CH ;CLEAN STACK 2 BYTES PER PARM TOTAL IS 12 HERE
WINDOW ENDP
GET_ABS_VID_ADR PROC NEAR
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
MOV AL,0A0H ;MOVE 160 TO AL. 160 IS SAME COLUMN DIFF ROW
MUL DH ;MULTPY ROW TO GET NEW ROW ADDRESS VALUE IS IN AX
SHL DL,1 ;MULTPY COL * 10
XOR DH,DH ;ZERO DH OUT
ADD AX,DX ;ADD ABS ADDRESS OF ROW + COLUMN
MOV DI,AX ;STORE DIST REG WITH ADDRESS
MOV AX,01000H ;MOV 4097 TO AX
MUL BX ;MULT BY 0
ADD DI,AX ;ADD TO DIST ADDR
RET
GET_ABS_VID_ADR ENDP
CHECK_RETRACE PROC NEAR
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
MOV DX,03DAH ;VIDEO CONTROLER PORT
NOT_READY: IN AL,DX ;INPORT TO AL
TEST AL,08 ;SEE IF IN RETRACE MODE
JZ NOT_READY ;YES LOOP BACK
SUB DX,+02 ;NOPE. SET PORT TO 03DC
MOV AL,25 ;PREP TO PROG DISP TO TURN OFF RETRACE
OUT DX,AL ;PROGRAM DISPLY CONTROLER
RET ;WERE DONE HERE
CHECK_RETRACE ENDP
PRG_VIA_MODE PROC NEAR
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
MOV AL,[CURRENT_VID_MODE] ;LOAD AL WITH VIDEO MODE
LEA BX,[VID_TABLE] ;LOAD VID_TABLE IN BX
XLATB ;TRANSLATE TO REFLETE VID MODE
MOV DX,03D8H ;LOAD DX WITH PORT OF VID CONTROLER
OUT DX,AL ;AND PROGRAM IT
RET ;WERE DONE HERE
PRG_VIA_MODE ENDP
MAKE_SOUND PROC NEAR
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
MOV AL,0B6H
OUT 43,AL
MOV AL,[TONE]
OUT 42,AL
MOV AL,00
OUT 42,AL
IN AL,61
OR AL,03
OUT 61,AL
MOV CX,[DURATION]
WAIT_UNTIL: LOOP WAIT_UNTIL
IN AL,61
AND AL,0FCH
OUT 61,AL
RET
MAKE_SOUND ENDP
MAKE_BOX PROC NEAR
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
MOV DH,[INCRM_ROW_PNTR] ;LOAD DH WITH TEMP ROW
MOV DL,[INCRM_COL_PNTR] ;LOAD DL WITH TEMP COL
MOV ES,[VIDEO_ADDRESS] ;LOAD ES SEG WITH VID ADDRESS
CLD ;CLEAR DIRECTION FLAG
MOV BL,[DBUG_POINT] ;MOVE 0 TO THE BL
XOR BH,BH ;ZERO OUT THE BH
CALL GET_ABS_VID_ADR ;GET ABS ADDR STORE IN DI REG
MOV AL,TOP_LEFT_CORNER ;LOAD AL WITH ╔
MOV AH,[ATRIBUTE_POINTER] ;AND THE ATRIBUTE SO AX HOLDS BOTH
STOSW ;MOVE IT TO THE ES:DI 'ABS ADDR OF VID SCREEN'
MOV CL,[WRITE_CHAR_X_TIMES] ;LOAD THE CX REG WITH NUMBER OF
MOV CH,00 ;TIMES TO WRITE THE BAR
MOV AL,HORIZONTAL_BAR ;LOAD AL WITH ═
REPZ STOSW ;MOVE IT UNTIL CX=0
MOV AL,TOP_RIGHT_CORNER ;LOAD AL WITH ╗
STOSW ;STORE IT ES:DI
MOV AL,[WRITE_CHAR_X_TIMES] ;LOAD AL
SHL AL,1 ;MULTIPLY BY 10
SUB AH,AH ;ZERO OUT AH
ADD DI,009CH ;ADD 156 FOR NEW POSITION
SUB DI,AX ;SUBTRACT LAST PLACE
MOV CL,[BYTES_MOVED] ;MOVE BYTES_MOVED TO CL
MOV CH,00 ;AND 0 TO CH
DRAW_VERT_BARS: PUSH CX ;SAVE CX FOR USE LATER
MOV AL,VERTICAL_BAR ;LOAD AL WITH ║
MOV AH,[ATRIBUTE_POINTER] ;AND THE ATRIBUTE
STOSW ;STORE IT ES:DI
MOV AL,SPACE ;MOVE A SPACE INTO AL
MOV AH,[ATRIBUTE_POINTER] ;AND THE ATRIBUTE
MOV CL,[WRITE_CHAR_X_TIMES] ;AND THE NUMBER OF TIMES TO WRITE IT
MOV CH,00 ;CH ALWAYS 0
REPZ STOSW ;NOW WRITE IT UNTIL CX=0
MOV AL,VERTICAL_BAR ;LOAD AL WITH ║
MOV AH,[ATRIBUTE_POINTER] ;AND THE ATRIBUTE
STOSW ;AND WRITE IT
MOV AL,[WRITE_CHAR_X_TIMES] ;LOAD AL
SHL AL,1 ;MULTI BY 10
SUB AH,AH ;ZERO OUT AH
ADD DI,009CH ;ADD 156 TO DISTINATION REG
SUB DI,AX ;SUBTRACT WHAT WE ALREADY DID
POP CX ;GET BACK BYTES MOVED
LOOP DRAW_VERT_BARS
MOV AL,BOTTOM_LEFT ;LOAD AL WITH ╚
MOV AH,[ATRIBUTE_POINTER] ;AND WITH THE ATRIBUTE
STOSW ;WRITE IT TO ES:DI
MOV CL,[WRITE_CHAR_X_TIMES] ;THIS MANY TIMES WE WILL WRITE
MOV CH,00 ;
MOV AL,HORIZONTAL_BAR ;THE HORIZONTAL BAR
REPZ STOSW ;NOW WRITE IT
MOV AL,BOTTOM_RIGHT ;AND THE BOTTOM RIGHT CORNER
STOSW ;AND WRITE IT
RET ;WE ARE DONE HERE
MAKE_BOX ENDP
WINDOWS ENDS
SAVEREST SEGMENT PARA
DGROUP GROUP DSEG,IDATA,SSEG,ZZMSEG
EGROUP GROUP ESEG
ASSUME CS:SAVEREST,DS:DGROUP,ES:EGROUP,SS:DGROUP
SAVEREST ENDS
OVERLAY_AREA SEGMENT PARA PUBLIC 'CODE'
OVERLAY_AREA ENDS
DSEG SEGMENT PARA
DSEG ENDS
IDATA SEGMENT COMMON PARA 'DATA'
IDATA ENDS
SSEG SEGMENT STACK PARA 'STACK'
SSEG ENDS
ZZMSEG SEGMENT MEMORY word 'MEMORY'
ZZMSEG ENDS
ESEG SEGMENT COMMON BYTE 'CCODE'
ESEG ENDS
_PROG SEGMENT PARA
PUBLIC SAVRST
ASSUME CS:_PROG,DS:_PROG
_PROG ENDS
_PROG SEGMENT PARA
PUBLIC SAVRST
ASSUME CS:_PROG,DS:_PROG
VIDEOMODE DB 0FFH
CURPAGE DB 0
CURSORPOS DW 0
SCREEN_SAVE_AREA LABEL WORD
SCREEN_SAVE_AREA_1 DW BYTES_IN_VIDEO_MEMORY DUP(0)
;***************************************************************************
;* *;
;* called as: *;
;* working-storage section. *;
;* 01 saverestore. *;
;* 03 save pic x value 'S'. *;
;* 03 restore pic x value 'R'. *;
;* *;
;* call 'savrst' using save | restore. *;
;* *;
;* *;
;* *;
;***************************************************************************
SAVRST PROC FAR ;THIS IS USED IN AN EXEC PROGRAM
PUSH BP ;SAVE THE BP REG
MOV BP,SP ;MOVE THE SP TO THE BP SO WE CAN GET
PUSH AX ;THE PARMS OFF THE STACK
PUSH BX ;SAVE ALL REGS ON ENTRY
PUSH CX ;GOOD PRACTICE WHEN INTERFACING TO
PUSH DX ;COBOL VERSION 6.05
PUSH DS
PUSH ES
PUSH SI
PUSH DI
MOV BX,WORD PTR [BP+CHAR_PARM] ;GET ADDRESS OF FIRST PARAMETER
MOV AX,WORD PTR [BX] ;LOAD AX WITH VALUE POINTED TO BY BX
AND AL,05FH ;MAKE SURE ITS IN CAPS
CLD ;CLEAR DIRECTING FLAG
CMP AL,SAVE ;IS IT A SAVE
JZ SAVE_SCREEN ;YEP
CMP AL,RESTORE ;IS IT A RESTORE
JZ RESTORE_SCREEN ;YEP
EXIT_SRST: POP DI ;PREPAIR TO EXIT
POP SI
POP ES
POP DS
POP DX
POP CX
POP BX
POP AX
POP BP
RET 2 ;WE RET 2 AS WE PASSED A CHAR TO THE ROUTINE
SAVE_SCREEN: XOR AL,AL ;ZERO OUT AL REG
MOV AH,0FH ;GET CURRENT VID MODE
INT 10 ;THROUGH A VID BIOS CALL
MOV cs:[VIDEOMODE],AL ;SAVE IT
MOV cs:[CURPAGE],BH ;AND PAGE
XOR AL,AL ;ZERO OUT AL REG
MOV AH,03 ;GET CURSOR POSITION
INT 10 ;VIA A VID BIOS CALL
MOV cs:[CURSORPOS],DX ;SAVE ROW COL
MOV AX,MONO_DISPLAY_ADDRESS ;ASSUME THIS IS A MONO DISPLAY
CMP BYTE PTR cs:[VIDEOMODE],07 ;CHECK TO MAKE SURE
JZ MONO_DISPLAY ;YEP IT'S MONO
MOV AX,COLOR_DISPLAY_ADDRESS ;NOPE ITS COLOR
MONO_DISPLAY: MOV DS,AX ;SET DS TO BASE OF VID ADDRESS
MOV SI,0000 ;SET SI TO 0 FOR COPY
PUSH CS ;SAVE CS AND ES
POP ES ;
MOV DI,offset cs:SCREEN_SAVE_AREA ;SET DESTINATION TO OUR SAVE AREA
MOV CX,BYTES_IN_VIDEO_MEMORY ;SET THE COUNT
REPZ MOVSW ;STORE IT
JMP EXIT_SRST
RESTORE_SCREEN: CMP BYTE PTR cs:[VIDEOMODE],0FFH ;SEE IF WE HAVE A SCRN TO RESTORE
JNZ VALID_SCREEN ;YEP WE DO
JMP EXIT_SRST ;NOPE YOU CALLED THE RESTORE WITHOUT SAVING FIRST
VALID_SCREEN: MOV BH,cs:[CURPAGE] ;GET CURRENT PAGE
MOV DX,cs:[CURSORPOS] ;AND THE CURSOR POS
XOR AL,AL ;ZERO OUT THE AL
MOV AH,02 ;SET THE CURSOR IN PLACE
INT 10 ;VIA A CALL TO VID BIOS
MOV AX,MONO_DISPLAY_ADDRESS ;LOAD THE BASE OF MONO
CMP BYTE PTR cs:[VIDEOMODE],07 ;SEE IF WE REALLY ARE MONO
JZ RESTORE_MONO ;YEP
MOV AX,COLOR_DISPLAY_ADDRESS ;NOPE
RESTORE_MONO: MOV ES,AX ;LOAD THE ES WITH THE VID BASE
MOV DI,0000 ;LOAD THE DEST WITH 0
PUSH CS ;PUSH CS
POP DS ;AND LOAD IT BACK TO THE DS
MOV SI,offset cs:SCREEN_SAVE_AREA ;SET THE SOURCE
MOV CX,BYTES_IN_VIDEO_MEMORY ;AND THE COUNT
REPZ MOVSW ;NOW DO IT
JMP EXIT_SRST
SAVRST ENDP
_PROG ENDS
WINDOWS SEGMENT PARA
DGROUP GROUP DSEG,IDATA,SSEG,ZZMSEG
EGROUP GROUP ESEG
ASSUME CS:WINDOWS,DS:DGROUP,ES:EGROUP,SS:DGROUP
WINDOWS ENDS
OVERLAY_AREA SEGMENT PARA PUBLIC 'CODE'
OVERLAY_AREA ENDS
DSEG SEGMENT PARA
;
;
; DATA STORAGE AND EQUATES USED BY WINDOW
;
;
VIDEO_ADDRESS DW 0B800H ;DEFAULT TO COLOR VIDEO ADDRESS
DBUG_POINT DB 0 ;HAD A PROBLEM HERE MAY BE REPLACED
CURRENT_VID_MODE DB 0 ;CURRENT VIDEO MODE
VID_TABLE DB 02CH ;VALUES TO PROGRAM THE
DB 028H ;VIDEO CONTROLER CHIP
DB 02DH ;TO SET SUCH THINGS AS RETRACE ON/OFF
DB 029H ;ACCEPT CHAR. ECT..
DB 02AH ;
DB 02EH ;
DB 01EH ;
ROW_POINTER DB 0 ;ROW FROM COBOL PROGRAM
COLUMN_POINTER DB 0 ;COLUMN FROM COBOL PROGRAM
WIDTH_POINTER DB 0 ;WIDTH FROM COBOL PROGRAM
HEIGHT_POINTER DB 0 ;HEIGHT FROM COBOL PROGRAM
INCRM_ROW_PNTR DB 0 ;WHERE WE STORE THE TEMP VALUES
INCRM_COL_PNTR DB 0 ;
WRITE_CHAR_X_TIMES DB 0 ;
BYTES_MOVED DB 0 ;
ATRIBUTE_POINTER DB 0 ;ATRIBUTE
DURATION DW 0
TONE DB 0FFH ;
SOUND_CONTROL DB 0
DSEG ENDS
IDATA SEGMENT COMMON PARA 'DATA'
IDATA ENDS
SSEG SEGMENT STACK PARA 'STACK'
SSEG ENDS
ZZMSEG SEGMENT MEMORY word 'MEMORY'
ZZMSEG ENDS
ESEG SEGMENT COMMON BYTE 'CCODE'
ESEG ENDS
END