;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Public Variables ;VGA ports V_ATTR = 3C0h ;Attribute Controller V_MISC = 3C2h ;Miscellaneous Output V_SEQ = 3C4h ;Sequencer V_PALR = 3C7h ;Palette index read V_PALW = 3C8h ;Palette index write V_PALD = 3C9h ;Palette data V_GRAPH = 3CEh ;Graphics Controller V_CRTC = 3D4h ;CRT Controller V_IS1 = 3DAh ;Input Status #1 CODEMAIN SEGMENT ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Calculate Character Position ; Loads DI with the memory offset of a character at screen location X,Y CPos MACRO X:REQ,Y:REQ Mov DI,((Y ShL 7)+X) ShL 1 ENDM ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Display Off ; ;Desc: ; Disables the display so the processor can have full access to video memory. ; Use this to make large screen updates faster. ;In: ; nothing ;Out: ; nothing ;Dest: ; nothing DispOff PROCDESC C NEAR ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Display On ; ;Desc: ; Enables the display after a call to DispOff. ;In: ; nothing ;Out: ; nothing ;Dest: ; nothing DispOn PROCDESC C NEAR ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Cursor State ; ;Desc: ; Turns the cursor on or off ;In: ; S = 0 - Off ; 1 - On ;Out: ; nothing ;Dest: ; nothing CurSt PROCDESC C NEAR State:Word ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Cursor Position ; ;Desc: ; Moves the cursor on the screen ;In: ; Pos -> Current screen location ;Out: ; nothing ;Destroys: ; nothing CurPos PROCDESC C NEAR Pos:Word ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Cursor Type ; ;Desc: ; Selects between an underline and a block cursor ;In: ; T = Type ; 0 - Underline ; 1 - Block ;Out: ; nothing ;Destroys: ; nothing CurType PROCDESC C NEAR T:Word ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Set Write Planes ; ;Desc: ; Enables writing to one or more of the four video planes ;In: ; P = Plane(s) to write to ; Bits 0-3 correspond to planes 0-3 ;Out: ; nothing ;Destroys: ; nothing SetWPlane PROCDESC C NEAR P:Word ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Get Write Planes ; ;Desc: ; Returns the planes currently enabled for writing ;In: ; nothing ;Out: ; AL = Planes ;Destroys: ; nothing GetWPlane PROCDESC C NEAR ;ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ;Set Read Plane ; ;Desc: ; Selects video plane to read from ;In: ; P = Plane to read from (0-3) ;Out: ; nothing ;Destroys: ; nothing SetRPlane PROCDESC C NEAR P:Word CODEMAIN ENDS