Changeset 28

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

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/includes/os2.inc

    r25 r28  
    2727;====================================================================== 
    2828_keyscnlnk                  EQU 4A1Ah 
    29 _getKey                     EQU 4972h 
     29_GetKey                     EQU 4972h 
    3030_Rec1stByteNC               EQU 4EFDh 
    3131_RecAByteIO                 EQU 4F03h 
     
    295295lcdTurnOn                   EQU    03h 
    296296lcdXAutoIncrementMode       EQU    05h 
     297lcdYAutoIncrementMode       EQU    07h 
    297298LCDdataPort                 EQU    11h 
    298299 
  • trunk/page00/boot.asm

    r27 r28  
    1010 EXTERN Placeholder005Fh,Placeholder0006h,Placeholder004Eh,Placeholder0003h,Placeholder0035h 
    1111 EXTERN outputPage,NZIf83Plus,_ZERO_PORT_3,_OUT_PORT_3,AnimateRunIndicator,PowerOff 
    12  EXTERN DispHexA,DispHexHL,IPutC,ReadKeyboardKey,ReadKeypad 
     12 EXTERN DispHexA,DispHexHL,IPutC,ReadKeyboardKey,ReadKeypad,ClrLCDFull 
    1313 EXTERN curBlink,resetAPDTimer,UpdateAPD,BCALL,BJUMP 
    1414 EXTERN _HandleDefaultUSBInterrupt,_ReadUSBInterruptData,_HandleUSBInterruptInitialize 
     
    462462       set onRunning,(iy+onFlags) 
    463463;Start the OS, minimal as it is 
     464       call ClrLCDFull 
    464465       res indicOnly,(iy+indicFlags) 
    465466       call ReadKeypad 
     
    490491$$:    ld hl,6 
    491492       ld (curRow),hl 
    492        B_CALL getKey 
     493       B_CALL GetKey 
    493494       ld hl,7 
    494495       ld (curRow),hl 
     
    535536 
    536537StartBootLoader: 
    537        ld hl,6 
     538       ld hl,0 
    538539       ld (curRow),hl 
    539540       ld hl,sBoot 
    540541       call PutS 
     542BootLoaderKeyLoop: 
     543       B_CALL GetKey 
     544       cp skYEqu 
     545       jr z,$F 
     546       jr BootLoaderKeyLoop 
     547$$:    call ClrLCDFull 
    541548       jr TurnCalculatorOn 
    542 sBoot: DB "Boot Loader",0 
    543  
     549sBoot: DB "Select Boot OS",0CEh,0 
     550 
  • 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: 
  • trunk/page1D/1Dbase.asm

    r22 r28  
    22 SEGMENT PAGE1D 
    33 
    4  PUBLIC _JErrorNo,_UnlockFlash,_getKey 
     4 PUBLIC _JErrorNo,_UnlockFlash,_GetKey 
    55 EXTERN JErrorNo,UnlockFlash,GetKey,keyscnlnk,Rec1stByteNC,RecAByteIO 
    66 
     
    24242424       DW 0000h 
    24252425       DB 00h 
    2426 _getKey: 
     2426_GetKey: 
    24272427       DW GetKey 
    24282428       DB 01h