Show
Ignore:
Timestamp:
08/02/09 02:18:59 (3 years ago)
Author:
brandonlw
Message:

Add the ability to clear the screen, and use it in the boot OS screen

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page00/display.asm

    r16 r28  
    22 SEGMENT PAGE00 
    33 
    4  PUBLIC AnimateRunIndicator,DispHexA,PutS,PutC,curBlink,SaveOScreen,DispHexHL,EraseEOL 
    5  EXTERN IsAtEditTail,IsAtBtm 
     4 PUBLIC AnimateRunIndicator,DispHexA,PutS,PutC,curBlink,SaveOScreen,DispHexHL,EraseEOL,ClrLCDFull 
     5 EXTERN IsAtEditTail,IsAtBtm,LCDDelay 
    66 
    77 include "includes\os2.inc" 
     8 
     9ClrLCDFull: 
     10       push af 
     11       ld hl,flags+shiftFlags 
     12       push hl 
     13       ld a,(hl) 
     14       and 1 
     15       push af 
     16       res 0,(hl) 
     17       ld b,128 
     18       ld a,0B8h 
     19       jr $F 
     20       di 
     21$$:    push bc 
     22       push af 
     23       call ClearRow 
     24       pop af 
     25       sub 8 
     26       pop bc 
     27       cp b 
     28       jr nc,$B 
     29       ei 
     30       nop 
     31       pop af 
     32       pop hl 
     33       or (hl) 
     34       ld (hl),a 
     35       pop af 
     36       ret 
     37ClearRow: 
     38       di 
     39       ld d,a 
     40       ld e,20h 
     41ClearRowLoop: 
     42       ld a,d 
     43       call SetLCDRow 
     44       call SetXAutoIncrementMode 
     45       ld b,8 
     46       ld a,e 
     47       call LCDDelay 
     48       out (LCDinstPort),a 
     49$$:    xor a 
     50       call LCDDelay 
     51       out (LCDdataPort),a 
     52       djnz $B 
     53       inc e 
     54       ld a,e 
     55       cp 2Ch 
     56       jr nz,ClearRowLoop 
     57       ret 
     58 
     59SetLCDRow: 
     60       call SetYAutoIncrementMode 
     61       cp 80h 
     62       ret c 
     63       cp 0C0h 
     64       ret nc 
     65       call LCDDelay 
     66       out (LCDinstPort),a 
     67       ret 
     68SetYAutoIncrementMode: 
     69       push af 
     70       ld a,lcdYAutoIncrementMode 
     71$$:    call LCDDelay 
     72       out (LCDinstPort),a 
     73       pop af 
     74       ret 
     75SetXAutoIncrementMode: 
     76       push af 
     77       ld a,lcdXAutoIncrementMode 
     78       jr $B 
    879 
    980SaveOScreen: