[ 53280,0:53281,0:646,(162):"":" USE LYNX TO DISSOLVE THIS FILE":10 2 *LYNX XV BY WILL CORLEY 8 S/GEOBROWSER.CVT 96 S 29 H/GEOBROWSER.CVT 8 S 72 GEOBROWSER.L.CVT 5 S 113 S/GEOBROWS2.CVT 138 S 29 S/GEOBROWHTM.CVT 22 S 196 S/GEOBROWS3.CVT 36 S 148 S/GBWDAAB.CVT 15 S 98 GEOBROWSERDO.CVT 41 S 167 S/geoBrowser_PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&Y3>5 cGt>QO0h ;***************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman ;* ;* This file contains all initialization ;* code and many of the common ;* tables and static data (since this ;* was finished first, it was useful ;* to not have to reassemble the ;* static data when code changed). ;* ;* This file also contains all of the ;* code necessary to managing the ;* file window. That's why its the ;* smaller of the two source files. ;******************************  .if Pass1 .include GEOSequates .endif  .psect ates .endif  .psect ct text and picture documents without loading their respective applications and without having to translate them into another file type. 0P0 ProgStart: ldb dispBufferOn,#(ST_WR_FORE|ST_WR_BACK) ldw R0,#TheFont-PageBuf ldw R1,#PageBuf jsr ClearRam ldb ColorDirty,#0  ldb PageNum,#0  0P0 jsr UseSystemFont jsr Set128Scrn jsr ClrScrn ; clear the screen jsr DrvSetup ; initialize the files ldw R0,#MyMenu ; and prepare the menus lda #0 jsr DoMenu ; set up the pull-down windows jsr InitEvnt ; initialize the windows rts ; return to geos kernal ******************  .if Pa0P0 DrvSetup: mvb curDrive,FileDrv mvb curDrive,DAABdrv jsr OpenDisk ldw A9,#FontTab jsr ReadFonts ; get the fonts from this drive mvw A9,FontTab1 NewDrv: ldb FileSkip,#0 ; initially, skip none lda FileDrv jsr SetDevice ; prepare to read disk jsr OpenDisk cpx #2 blt 10$ ; error opening disk! jmp FError 10$: ldx #A2 ; get the disks name jsr GetPtrCurDkNm ldw A3,#FileDrvN ; copy disk name over jsr CopyFnam NxtDrv: ldb FilesRead,#0 ; number of files read in this time ldw R0,#FileBufE-FileBuf ldw R1,#FileBuf jsr ClearRam ; clear the file names list ldw A2,#FileBuf ldb DotFlag,#0 jsr IsNative bne 12$ lda FileSkip ; now, are we at the top? bne 12$ inc DotFlag ldw A8,#NVtxt0 ldw A9,#FileBuf ldx #A8 ldy #A9 jsr CopyString ldw A2,#FileBuf+3 12$: ldw A3,#FileBufE ; now get the file list for this pg mvb FileSkip,A4L ldb A4H,#27 ; can't fit more than that anyhow jsr File2List sta FilesRead cpb DAABdrv,curDrive ; check for second font set beq 13$ mvw FontTab1,A9 ; second set needed, so get it jsr OpenDisk jsr ReadFonts bra 14$ 13$: mvw FontTab1,A1 ; not needed, so clear prior sets ldy #0 tya sta (A1),y 14$: ldb FileClkd,#0 ; init first, clicked tax rts NVtxt0: .byte "..",0 immerman",27,0 Abt0P0 DARefrsh: lda FileDrv ; refresh screen after a DA runs 0P0 jsr SetDevice jsr OpenDisk jsr DrawWinA rts DrawFiBx: jsr UnColor jsr DrDskDrv ; redraw the File window jsr RedyWin1 ldw Arro2+1,#RedyWin1 jsr DrawArro jsr DrwFlNms rts Set128Scrn: cwi rightMargin,#330 blt 90$  cbi $c00f,#$40 ; check for Wheels blt 10$ cbi $904f,#$50 ; please blt 10$ lda #2 jsr $c2f5 ; setcolormode  ldb ColorDirty,#1  jsr UnColor 10$: 0P0 Set128Scrn: cwi rightMargin,#330 blt 90$  cbi $c00f,#$40 ; check for Wheels blt 10$ cbi $904f,#$50 ; please blt 10$ lda #2 jsr $c2f5 ; setcolormode  ldb ColorDirty,#1  jsr UnColor 10$: lda MyMenu+5 ; widen for C128 users ora #$80 sta MyMenu+5  90$: rts cwi rightMargin,#330 blt 90$  cbi $c00f,#$40 ; check for Wheels blt 10$ cbi $904f,#$50 ; please blt 10$ lda #2 jsr $c2f5 ; setcolormode  ldb ColorDirty,#1  jsr UnColor 10$: 0P0 DrwFlNms: lda #0 ; populate file win w/ filenames 0P0 jsr SetPattern jsr RedyWin1 ; init this window jsr SizeArea ldw A2,#0 ldb A3L,#5 jsr WSetClick ; set filename area click jsr Rectangle lda #1 jsr SetPattern jsr RedyWin1 jsr SizeArea ldw A2,#FileBuf lda FileClkd sta A3L ; highlight if necessary jsr PrntList ; otherwise, display the list txa beq 10$ ; if nothing down, get out sec sbc DotFlag ; adjust for "..." fake file 10$: sta FileShown ; and inform of number shown rts ttom arrow! mvw R4,R3 mvb R2H,R2L svw #1,R4 svw #11,R3 svb #15,R2H ; now have square for arrow svb #24,R2L ldw A2,#0 ldb A3L,#2 jsr WSetClick mvb R2L,R11L sta R11H mvw R3,A3 12$: mvw A3,R0P0 DrawArro: ldb Temp1,#0 ; toggle point mvw R4,R3 mvb R2L,R2H svw #1,R4 svw #11,R3 avb #24,R2H avb #15,R2L ; now have square for arrow ldw A2,#0 ldb A3L,#1 jsr WSetClick mvb R2H,R11L sta R11H mvw R3,A3 10$: mvw A3,R3 ; prepare to draw line mvb R11L,R2H lda #0 sec jsr DrawLine ldx R2H dex stx R11L stx R11H inc Temp1 bne 98$ avw #1,A3 ; R3 is only lost register svw #1,R4 cpw A3,R4 blt 10$ bge 11$ ; loop up to complete it 98$: ldb Temp1,#$ff bne 10$ 11$: ldb Temp1,#0 Arro2: jsr RedyWin1 ; now do the bottom arrow! mvw R4,R3 mvb R2H,R2L svw #1,R4 svw #11,R3 svb #15,R2H ; now have square for arrow svb #24,R2L ldw A2,#0 ldb A3L,#2 jsr WSetClick mvb R2L,R11L sta R11H mvw R3,A3 12$: mvw A3,R3 ; prepare to draw line mvb R11L,R2H lda #0 sec jsr DrawLine ldx R2H inx stx R11L stx R11H inc Temp1 bne 99$ avw #1,A3 ; R3 is only lost register svw #1,R4 cpw A3,R4 blt 12$ bge 13$ 99$: ldb Temp1,#$ff bne 12$ 13$: rts ; done with both arrows my0P0 DrDskDrv: jsr RedyWin1 mvb R2H,R1H ; prepare to write words svb #4,R1H ; pull bottom up a bit mvw R3,R11 avw #3,R11 ; prepare the left side ldw R0,#DrvBXtxt  cbi numDrives,#2 ; no Drive icon for 1 dri0P0 DrawArRL: mvb R2H,R2L mvw R4,R3 svw #28,R3 ldb Temp1,#7 jsr ArSetup ldw A4,#ArBitR ; the bit pattern jmp ArrowGo DrawArRR: mvb R2H,R2L avw #8,R3 mvw R3,R4 ldb Temp1,#6 jsr ArSetup ldw A4,#ArBitL ; the bit pattern jmp ArrowGo ArrowGo: 10$: jsr ArHlp ldy #0 lda (A4),y jsr HorizontalLine avw #8,R3 jsr ArHlp inw A4 ldy #0 lda (A4),y jsr HorizontalLine inw A4 svw #8,R3 inc R11L cpb R11L,R2H blt 10$ rts b R11L,R2H blt 10$ rts s s $ff bne 100P0 ArHlp: mvw R3,R4 avw #7,R4 rts ArSetup: lda R3L and #%11111000 sta R3L mvw R3,R4 avw #16,R4 svb #1,R2H svb #11,R2L ldw A2,#0 mvb Temp1,A3L jsr WSetClick mvb R2L,R11L rts ,R11L rts the bit pattern jmp ArrowG0P0 ArBitR: .byte %11100000, %00000000 .byte %11111100, %00000000 .byte %11111111, %10000000 .byte %11111111, %11110000 .byte %11111111, %11111111 .byte %11111111, %11111111 .byte %11111111, %11110000 .byte %11111111, %10000000 .byte %11111100, %00000000 .byte %11100000, %00000000 ArBitL: .byte %00000000, %00000111 .byte %00000000, %00111111 .byte %00000001, %11111111 .byte %00001111, %11111111 .byte %11111111, %11111111 .byte %11111111, %11111111 .byte %00001111, %11111111 .byte %00000001, %11111111 .byte %00000000, %00111111 .byte %00000000, %00000111 .byte %00001111, %11111111 .byte %11111111, %11111111 .byte %11111111, %11111111 .byte %00001111, %11111111 .byte %00000001, %11111111 .byte %00000000,0P0 DrDskDrv: jsr RedyWin1 mvb R2H,R1H ; prepare to write words svb #4,R1H ; pull bottom up a bit mvw R3,R11 avw #3,R11 ; prepare the left side ldw R0,#DrvBXtxt  cbi numDrives,#2 ; no Drive icon for 1 drive blt 20$  jsr PutString ; write the word DRIVE 20$: jsr IsNative ; Disk on native, OK beq 21$ cpb FileDrv,DAABdrv ; can't change DA Disk! beq DrBoxes 21$: jsr RedyWin1 mvb R2H,R1H ; prepare to write words svb #4,R1H ; pull bottom up a bit mvw R3,R11 avw #38,R11 ; prepare the left side ldw R0,#DskBXtxt jsr PutString DrBoxes: jsr RedyWin1 mvw R3,R4 mvb R2H,R2L ; point to bottom left svb #2,R2H ; a little off the bottom svb #12,R2L ; a lot off the top avw #2,R3 ; a little more right on left avw #35,R4 ; a lot more right on right ldw A2,#0 ldb A3L,#3  cbi numDrives,#2 ; no Drive icon for 1 drive blt 30$ 29$: jsr WSetClick lda #255 jsr FrameRectangle ; draw one box 30$: jsr IsNative ; Disk on native, OK beq 31$ cpb FileDrv,DAABdrv ; no disk box on DA drive beq 11$ 31$: avw #35,R3 avw #25,R4 ; now get the other ldw A2,#0 ldb A3L,#4 jsr WSetClick lda #255 jsr FrameRectangle rts 11$: lda #0 tax 12$: sta R2L,x inx cpx #6 bne 12$ ldw A2,#0 ; now really clear it ldb A3L,#4 jsr WSetClick rts DrvBXtxt: .byte "Drive",0 DskBXtxt: .byte "Disk",0 k",0 BXtxt: .byte "Disk",0 ",0 ",0 0P0 SizeArea: ; zero in on viewable area avb #15,R2L svb #16,R2H svw #16,R4 avw #4,R3 rts MainEvnt: rts |0P0 FiBxClick: jsr i_ChkClick .byte 1 txa bne 11$ ; inside top arrow!! jmp UpBu0P0 FiBxClick: ldb A2L,#1 0P0 jsr ChkClick txa bne 11$ ; inside top arrow!! jmp UpButt 11$: ldb A2L,#2 jsr ChkClick txa bne 13$ ; inside bottom arrow!! jmp DnButt 13$: ldb A2L,#4 jsr ChkClick txa bne 14$ ; disk click registered jmp DiskBx 14$: ldb A2L,#3 jsr ChkClick txa bne 15$ jmp DriveBx 15$: jsr RedyWin1 jsr SizeArea ; check for filename click jsr ClkList txa bne 16$ ; no can do, so exit! 99$: rts 16$: cmp FileClkd bne 18$ lda dblClickCount ; yes, so check for a doubleclk beq 17$ ldb dispBufferOn,#(ST_WR_FORE) jmp FileInit ; double click occurred!!!! 17$: ldb dblClickCount,#$40 rts 18$: sta Temp1 ; store the potential click sec sbc DotFlag ; make it comparible to numshown cmp FileShown ; too far down is bad, so bye! bge 99$ ldb dispBufferOn,#(ST_WR_FORE) lda FileClkd beq 19$ sta A2L jsr PikList ; uninvert selected item 19$: lda Temp1 sta A2L jsr PikList ; invert new item mvb Temp1,FileClkd ldb dblClickCount,#$40 rts new item mvb Temp1,FileClkd ldb dblClickCount,#$40 rts 0 rts rts rts ldb A3L,#4 jsr WSetClick lda #255 jsr FrameRectangle rts 11$: lda #0 tax 12$: sta R2L,x inx cpx #6 bne 12$ ldw A2,#0 ; now really clear it ldb A3L,#4 0P0 UpButt: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda FileSkip ; don't go up if on top beq 12$ ldw A2,#FileBuf ldw A3,#FileBuf ldw A4,#FileBuf jsr CtFRows cmp FileSkip bge 10$ sta FileClkd ; dont panic, just using it as temp sbb FileClkd,FileSkip bra 11$ 10$: ldb FileSkip,#0 11$: ldb FileClkd,#0 ; clear clicked on item jsr NxtDrv ; rewrite up filenames jsr DrwFlNms 12$: ldb A2L,#1 jsr ChkClick jmp InvertRectangle 0P0 0P0 DnButt: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle ldw A2,#FileBuf ldw A3,#FileBuf jsr CtFRows cmp FileShown bgt 12$ ; if more rows than shown, done adb FileShown,FileSkip dec FileSkip ldb FileClkd,#0 ; clear clicked on item jsr NxtDrv ; draw down filenames jsr DrwFlNms 12$: ldb A2L,#2 jsr ChkClick  jmp InvertRectangle 0P0 sr DrwFlNms 12$: jsr i_ChkClick .byte 1 ; quick way to reinvert jmp InvertRectangle ; yes, so0P0 CtFRows: jsr RedyWin1 jsr SizeArea ldx #0 10$: inx avb #8,R2L cpb R2L,R2H blt 10$ dex txa rts ws cmp FileShown bgt 12$ ; if more rows than shown, done adb FileShown,FileSkip ldb FileClkd,#0 ; clear clicked on 0P0 CloseBut: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda ActiveWN ; close which window? beq 10$ lda PageNum ; don't close 2 if not open beq 10$ jmp ClosWin2 10$: jsr i_WinAct .byte 2 ldb dispBufferOn,#(ST_WR_FORE | ST_WR_BACK) rts n0P0 DriveBx: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda PageNum ; if file open, CLOSE IT beq 10$ jsr ClosWin2 10$: ldy FileDrv iny cpy #11 bne 11$ ldy #8 11$: sty FileDrv tya 0P0 DriveBx: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda PageNum ; if file open, CLOSE IT beq 10$ jsr ClosWin2 10$: ldx #$08 lda numDrives add #7 cmp curDrive ble 20$ ldx curDrive inx 20$: txa jsr SetDevice jsr OpenDisk cpx #0 bne 10$ mvb curDrive,FileDrv jsr NewDrv txa bne 10$ jsr RedyWin1 jmp DrawWin1 DiskBx: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda PageNum ; if file open, CLOSE IT beq 10$ jsr ClosWin2 10$: jsr IsNative 0P0 DiskBx: ldb dispBufferOn,#(ST_WR_FORE) jsr InvertRectangle lda PageNum ; if file open, CLOSE IT beq 10$ jsr ClosWin2 10$: jsr IsNative bne 12$ jsr ElimDAs  11$: lda #(5 | 64) jsr $9d80 jsr $5003 ; change partition jsr $9d83 ; restore kernal bra 21$ 12$: ldw R0,#DiskBxD jsr DoDlgBox 21$: jsr NewDrv txa bne 10$ jmp DrawWin1 DiskBxD: .byte $80 | $01 ; draw the insert disk box .byte 11 .byte $0e,$12 .word DiskBxT .byte $01,$0f,$42 .byte 0 DiskBxT: .byte $18,"Insert new disk into disk drive.",27,0 IsNative: cbi $c00f,#$40 blt 10$ cbi $904f,#$50 blt 10$ ldy FileDrv lda driveType-8,y and #%00000111 cmp #$04 blt 10$ ldx #0 rts 10$: ldx #1 rts ElimDAs: rts rive,DAABdrv bne 13$ lda #VERT0P0 ClikEvnt: lda mouseData ; handle activations beq 11$ 10$: rts 11$: lda ActiveWN bne 12$ jsr FiBxClick bra 10$ 12$: jsr RdBxClick bra 10$ xClick bra 10$ BxClick bra 10$ 12$: jsr RdBxClick bra 10$ 003 ; change part0P0 InitEvnt: mvb rightMargin+1,InitEvn2+1 ; right win right mar hb lda rightMargin sec sbc #4 sta InitEvn2 ; right win right mar lb mvw rightMargin,A0 ldw A1,#3 ldy #A1 ; divide right margin by 3 ldx #A0 jsr Ddiv svw #5,A0 mvw A0,InitEvn2-2 ; is right win left mar svw #5,A0 mvw A0,InitEvn1 ; left win right margin jsr i_Win1Init .word FileDrvN .word CloseBut .word DrawFiBx .byte 1 ; enable this window? jsr i_Win1Mv .byte $14 .byte $c5 .word $0006 InitEvn1: .word $0061 .byte 0 ; do not draw now ldb RDTBtxt,#0 ; initialize read window titetext jsr i_Win2Init .word RDTBtxt .word CloseBut .word DrawRdBx .byte 1 ; enable this window? jsr i_Win2Mv .byte $14 .byte $c5 .word $0068 InitEvn2: .word $013a .byte 0 ; do not draw now jsr i_WindInit .word MainEvnt .word ClikEvnt .byte 1 ; File box is active .byte 1 ; yes, draw them now rts CLIKTRAP,#0 rts rts rts ldb CLIKTRAP,#0  rts rts List ; invert new item mvb Temp1,FileClkd ldb dblCl0P0 ; A9 points into font tab ReadFonts: cwi A9,#FontTab1-2 blt 13$ 11$: ldx #0 lda #0 tay sta (A9),y rts ; no room left anyway 13$: ldw R0,#TransTyp-TheFont ldw R1,#TheFont ; initialize filename area jsr ClearRam ldw R6,#TheFont ; used for filename storage ldb R7L,#FONT ldb R7H,#8 ; only 8 from each disk max ldw R10,#0 ; no class pointer jsr FindFTypes cpx #0 bne 11$ ; was a disk error ldw A8,#TheFont FntLp: ldy #0 lda (A8),y bne 15$ ; found last font -- done 11$: ldx #0 lda #0 ; exit tay sta (A9),y rts ; no room left anyway 15$: ldx #A8 ; make a copy of the src pointer ldy #A9 ; make a copy of the dest pointer jsr CopyString ; copy string into place avw #17,A8 ; increment source pointer mvw A9,R6 ; re-copy dest filename 17$: ldy #0 lda (A9),y ; make sure pointing past the end pha inw A9 pla bne 17$ ldb $886e,#$ff ; search only this drive jsr FindFile ; open the font for inspection cpx #0 bne 11$ ldw R9,#$8400 ; point to dir entry jsr GetFHdrInfo cpx #0 bne 11$ ; .x will be zero for header info eq 11$ 31$: avw #35,R3 avw #25,R4 ; now get the other ldw A2,#0 ldb A3L,#4 jsr WSetClick lda #255 jsr FrameRectangle rts 11$: lda #0 tax 12$: sta R2L,x inx cpx #6 bne 12$ ldw A2,#0 0P0 ; read font table info continued ldw A1,#$8100 + $82 ldw A2,#$8100 + $60 18$: ldy #0 19$: lda (A1),y sta (A9),y sta Temp1,y ; copy font info iny cpy #2 bne 19$ avw #2,A1 ldy #2 20$: lda (A2),y sta Temp1+1,y ; save size info ylp 20$ avw #2,A2 cwi Temp1,#0 beq 22$ ; found last font size! cwi Temp1+2,#2000 bge 22$ ; this ones too big! done w/font avw #2,A9 bra 18$ 22$: ldy #0 ; save 00 delimeter tya sta (A9),y iny sta (A9),y avw #2,A9 jmp FntLp 0P0 MyMenu: .byte 0,14 ; main menu data 0P0 .word 0,24 .byte 1|HORIZONTAL .word MNtxt1 .byte VERTICAL .word FImenu MNtxt1: .byte "file",0 ,A1 ldy #2 20$: lda (A2),y sta Temp1+1,y ; save0P0 FImenu: .byte 15,15+1+(3*14) ; file menu data .word 0,22+20 .byte VERTICAL | 3 .word FItxt0 .byte MENU_ACTION .word R_DoOpen .word FItxt1 .byte MENU_ACTION .word R_DoClose .word FItxt2 .byte MENU_ACTION .word R_DoExit FItxt0: .byte "open",0 FItxt1: .byte "close",0 FItxt2: .byte "exit",0 wi Temp1+2,#2000 bge 22$ ; this ones too big! done w/font avw #2,A9 bra 18$ 22$: ldy #0 ; save 00 delimeter tya sta (A9),y iny sta (A9),y avw #2,A9 jmp FntLp one0P0 R_DoExit: ldb PageNum,#0 jsr GotoFirstMenu ; open click -- open a file lda DAABdrv ; exit click -- exit the app jsr SetDevice ldw RecoverVector,#0 jsr UnColor jsr AbtBox jmp EnterDeskTop R_DoOpen: jsr GotoFirstMenu ; open click -- open a file lda FileClkd bne 10$ jsr i_CNCLBox .word POtxt0 rts 10$: jsr UnColor jmp FileInit POtxt0: .byte $18,"Select a file first.",27,0 R_DoClose: jsr GotoFirstMenu ; open click -- open a file lda PageNum beq 10$ jsr ClosWin2 10$: rts lda #0 ; exit tay sta (A9),y rts ; no room left anyway 15$: ldx #A8 ; make a copy of the src pointer ldy #A9 ; make a copy of the dest pointer jsr CopyString ; copy string into place avw #17,A8 ; increment source pointer mvw A9,R6 ; 0P0 ;********************************* ;* Trans1, Trans2 - packed text translation ;* tables. ;* ;********************************* Trans1: ; ** Commodore -> GEOS .byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; 0-9 .byte $ff,$ff,$ff,0,$ff,$ff,$ff,$ff,$ff,$ff ; 10-19 .byte $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff ; 20-29 .byte $ff,$ff,0,0,0,0,0,0,0,0 ; 30-39 .byte 0,0,0,0,0,0,0,0,0,0 ; 40-49 .byte 0,0,0,0,0,0,0,0,0,0 ; 50-59 .byte 0,0,0,0,0,0,0,0,0,0 ; 60-69 .byte 0,0,0,0,0,0,0,0,0,0 ; 70-79 .byte 0,0,0,0,0,0,0,0,0,0 ; 80-89 .byte 0,0,0,0,0,0," " ; 90-99 .byte " " ; 100-109 .byte " aaaaa" ; 110-119 .byte "aaaabbcccc" ; 120-129 .byte "cdddeeeeee" ; 130-139 .byte "eeeffgghhh" ; 140-149 .byte "hhiiiiiiii" ; 150-159 .byte "ikkkllllll" ; 160-169 .byte "lmmmmnnnnn" ; 170-179 .byte "ooooooooop" ; 180-189 .byte "pr",0,0,0,0,0,0,0,0 ; 190-199 .byte 0,0,0,0,0,0,0,0,0,0 ; 200-209 .byte 0,0,0,0,0,0,0,0,0,0 ; 210-219 .byte "rrrrssssss" ; 220-229 .byte "ttttttttuu" ; 230-239 .byte "uvwwwyy",$ff,$ff,$ff ; 240-249 .byte $ff,$ff,$ff,$ff,$ff,$ff ; 250-255 Trans2: ; ** Commodore -> GEOS .byte 0,0,0,0,0,0,0,0,0,0 ; 0-9 .byte 0,0,0,13,0,0,0,0,0,0 ; 10-19 .byte 0,0,0,0,0,0,0,0,0,0 ; 20-29 .byte 0,0," !",34,"#$%&'" ; 30-39 .byte "()*+,-./01" ; 40-49 .byte "23456789:;" ; 50-59 .byte "<=>?@abcde" ; 60-69 .byte "fghijklmno" ; 70-79 .byte "pqrstuvwxy" ; 80-89 .byte "z",$18,"`",27,"^_abcd" ; 90-99 .byte "efghilmnop" ; 100-109 .byte "rstwy cdil" ; 110-119 .byte "nrsteoaehk" ; 120-129 .byte "o ei adeln" ; 130-139 .byte "rst o e ae" ; 140-149 .byte "iocgklmnrs" ; 150-159 .byte "t ei aeilo" ; 160-169 .byte "y aeo degt" ; 170-179 .byte " fnorstuwe" ; 180-189 .byte "o -ABCDEFG" ; 190-199 .byte "HIJKLMNOPQ" ; 200-209 .byte "RSTUVWXYZ " ; 210-219 .byte "eios ehist" ; 220-229 .byte " aehiorslr" ; 230-239 .byte "teaei o",0,0,0 ; 240-249 .byte 0,0,0,0,0,0 ; 250-255 .byte 0 0P0 Trans3: ; ** Commodore -> GEOS -- straight ascii .byte 0,0,0,0,0,0,0,0,0,0 ; 0-9 .byte 0,0,0,13,0,0,0,13,18,0 ; 10-19 .byte 0,0,0,0,0,0,0,0,0,32 ; 20-29 .byte 0,0," !",34,"#$%&'" ; 30-39 .byte "()*+,-./01" ; 40-49 .byte "23456789:;" ; 50-59 .byte "<=>?@abcde" ; 60-69 .byte "fghijklmno" ; 70-79 .byte "pqrstuvwxy" ; 80-89 .byte "z[~]^<-",0,0,0 ; 90-99 .byte 0,0,0,0,0,0,0,0,0,0 ; 100-109 .byte 0,0,0,0,0,0,0,0,0,0 ; 110-119 .byte 0,0,0,0,0,0,0,0,0,0 ; 120-129 .byte 0,0,0,0,0,0,0,0,0,0 ; 130-139 .byte 0,13,0,0,0,0,19,0,0,0 ; 140-149 .byte 0,0,0,0,0,0,0,0,0,0 ; 150-159 .byte 32,0,0,0,0,0,0,0,0,0 ; 160-169 .byte 0,0,0,0,0,0,0,0,0,0 ; 170-179 .byte 0,0,0,0,0,0,0,0,0,0 ; 180-189 .byte 0,0,0,"ABCDEFG" ; 190-199 .byte "HIJKLMNOPQ" ; 200-209 .byte "RSTUVWXYZ",0 ; 210-219 .byte 0,0,0,0,32,0,0,0,0,0 ; 220-229 .byte 0,0,0,0,0,0,0,0,0,0 ; 230-239 .byte 0,0,0,0,0,0,0,0,0,0 ; 240-249 .byte 0,0,0,0,0,0 ; 250-255 .byte 0 ; 220-229 .byte 0,0,0,0,0,0,0,0,0,0P0 ;** lex code translation table. ;** 0=do not use, 1=alpha, 2=word term char, 3=num, 4=end, 5=escape ;** 6=word term code CodeChrt: .byte 0,4,0,0,0,0,0,0,0,5 ; 0-9 .byte 4,0,4,4,0,6,5,5,6,6 ; 10-19 .byte 0,0,0,5,6,6,6,6,0,0 ; 20-29 .byte 0,0,3,3,3,3,3,3,3,3 ; 30-39 .byte 3,3,3,3,3,3,3,3,2,2 ; 40-49 .byte 2,2,2,2,2,2,2,2,3,3 ; 50-59 .byte 3,3,3,3,3,1,1,1,1,1 ; 60-69 .byte 1,1,1,1,1,1,1,1,1,1 ; 70-79 .byte 1,1,1,1,1,1,1,1,1,1 ; 80-89 .byte 1,3,3,3,3,3,3,1,1,1 ; 90-99 .byte 1,1,1,1,1,1,1,1,1,1 ; 100-109 .byte 1,1,1,1,1,1,1,1,1,1 ; 110-119 .byte 1,1,1,3,3,3,3,0,0,0 ; 120-129 .byte 0,0,0,0,0,0,0,0,0,0 ; 130-139 .byte 0,0,0,0,0,0,0,0,0,0 ; 140-149 .byte 0,0,0,0,0,0,0,0,0,0 ; 150-159 .byte 0,0,0,0,0,0,0,0,0,0 ; 160-169 .byte 0,0,0,0,0,0,0,0,0,0 ; 170-179 .byte 0,0,0,0,0,0,0,0,0,0 ; 180-189 .byte 0,0,0,0,0,0,0,0,0,0 ; 190-199 .byte 0,0,0,0,0,0,0,0,0,0 ; 200-209 .byte 0,0,0,0,0,0,0,0,0,0 ; 210-219 .byte 0,0,0,0,0,0,0,0,0,0 ; 220-229 .byte 0,0,0,0,0,0,0,0,0,0 ; 230-239 .byte 0,0,0,0,0,0,0,0,0,0 ; 240-249 .byte 0,0,0,0,0,0 ; 250-255 e $ff,$ff,$ff,$ff,$ff,$ff ; 250-255 Trans2: ; ** Commodore -> GEOS .byte 0,0,0,0,0,0,0,0,0,0 ; 0-9 .byte 0,0,0,13,0,0,0,0,0,0 ; 10-19 .byte 0,0,0,0,0,0,0,0,0,0 ; 20-29 .b0P0 DefCard: .byte 0 ; track .byte 0 ; sector .byte 1 ; byte .byte $00,$09 ; font id .byte $01 ; plain text .byte 0,0 ; tab 1 .byte 0,0 ; tab 2 .byte 0,0 ; tab 3 .byte 0,0 ; tab 4 .byte 0,0 ; tab 5 .byte 0,0 ; tab 6 .byte 0,0 ; tab 7 .byte 0,0 ; tab 8 .word 0 ; paragraph margin .byte %00000000 ; left-single justification .byte 0 ; default HTMLmode 0P0 .ramsect Temp1: .block 20 Temp2: .block 20 Temp3: .block 20 DAinfo: .block 10 CLIKT0P0 .ramsect Temp1: .block 20 Temp2: .block 20 Temp3: .block 20 DAinfo: .block 10 FileDrv: .block 1 ; drive # of current disk FileDrvN: .block 20 ; name of current disk FileBuf: .block 511 ; list of files FileBufE: .block 1 ; end of file list DotFlag: .block 1 ; 1="..." shown, 0=not FileTop: .block 2 ; pointer to current top file FileSkip: .block 1 ; absolute num files down we are FilesRead: .block 1 ; number of files in window FileShown: .block 1 ; number shown on screen FileClkd: .block 1 ; which file # is clicked FontTab: .block 500 ; names of found fonts FontTab1: .block 2 ; pointor into FontTab to 2nd setFontTab to 2nd set0,0,0,0,0,0,0,0 ; 140-149 .byte 0,0,0,0,0,0,0,0,0,0 ; 150-159 .byte 0,0,0,0,0,0,0,0,0,0 ; 1.byte 2|HORIZONTAL .word MNtxt0 .byte VERTICAL .word DAABMenu .word MNtxt1 .byte VERTICAL .word FImenu MNtxt0: .byte "geos",0 MNtxt1: .byte "file",0 AbtText: .byte $1a,$18," geoBrowser",27,0 .byte " VersH/geoBrowser;PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V1.1GEOPROGRAMMER sample file.H P ;***************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman ;***************************** .if Pass1 .include GEOSequates .endif .header ;start of header section .word 0 ;first two bytes = 0 .byte 3 ;width in bytes .byte 21 ;and height in scanlines of: @ .byte $80 | 3 ;Commodore type, bit 7 S .byte APPLICATION ;Geos file type .byte SEQUENTIAL ;Geos file structure type .word ProgStart ;load address of program .word $3ff ;end address, needed for ;desk accessories. .word ProgStart ;init address of program .byte "geoBrowser 1.6a",0,0,0,64 ;perm. filename 12 chars, ;4 char version number, ;3 zeroes, ;40/80 column flag. .byte "Bo Zimmerman ",0 ;19 character author name ;end of header section which is checked for accuracy .block 160-117 ;skip 43 bytes... .byte "Browse SEQ files, ASCII, LoadStar, geoWrite, " .byte "geoPaint, Notes, Text and Photo Albums." .endh nt, Notes, Text and Pho a?cÀŁɂÑ!AAA2  0HH0HH0yte "23456789:;" ; 50-59 .byte "<=>?@abcde" ; 60-69 .byte "fghijklmno" ; 70-79 .byte "pqrstuvwxy" ;geoBrowser.lnkPRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&qP ;***************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman ;***************************** .output geoBrowser .header H/geoBrowser.rel .seq .psect $0400 S/geoBrowser.rel S/geoBrows3.rel S/geoBrows2.rel APIcommon.rel MODwin2.rel MODflist.rel MODclicks.rel MODferr.rel MODscrn.rel S/gbwDAAB.rel S/geoBrows2PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&Uu]EoAH=(9b+okB0P ;****************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman ;* ;* This file contains all of the code for ;* managing the viewing window. It ;* also contains all of the file opening, ;* translating, closing, displaying code. ;* Fonts, tabs, escape codes, and ;* everything else necessary to viewing ;* an open file is found herein. ;****************************** .noeqin .if Pass1 .include GEOSequates .endif .glbl .eqin .psect e0P0 DrawRdBx: jsr UnColor ; redraw the viewing window lda PageNum beq 10$ lda dispBufferOn jsr RdBxMeat 10$: jsr ShowPage ; redisplay text if any rts RdBxMeat: pha mvb dispBufferOn,dispBuf pla sta dispBufferOn ldw Arro2+1,#RedyWin2  jsr RedyWin2  jsr DrawArro ; draw the up/down arrows 0P0 jsr IsGeoPaint bne 15$ jsr RedyWin2 jsr DrawArRL ; draw the up/down arrows jsr RedyWin2 jsr DrawArRR ; draw the up/down arrows 15$: mvb dispBuf,dispBufferOn rts R1,#FileBuf jsr ClearRam ; clear the file names list ldw A2,#FileBuf ldb DotFlag,#0 jsr IsNative bne 12$ lda FileSkip ; now, are we at the top? bne 12$ inc DotFlag ldw A8,#NVtxt0 ldw A9,#FileBuf ldx #A8 ldy #A9 jsr CopyStr0P0 ClosWin2: jsr UnColor ldb RDTBtxt,#0 ; reset the "open" variables ldb PageNum,#0 jsr DrawWin2 jsr RedyWin2 ; imprint, and hope this is good jsr ImprintRectangle jsr i_WinAct .byte 1 rts les ldb PageNum,#0 jsr Draw0P0 FileInit: ldb RDTBtxt,#0 ldb PageNum,#0 ; decides whether page open sta GPColSkip ldb TransTyp,#0 ; dunno what kind of file mvb FileClkd,A4L cmp #1 bne 10$ lda DotFlag beq 14$ jsr ElimDAs lda #(5|64) jsr $9d80 ; get new kernal jsr $5012 jsr $9d83 ; restore kernal  jsr NewDrv jmp DrawWin1  10$: ldw A2,#FileBuf ; get ready to find filename ldw A3,#A9 dec A4L jsr DownList ; get item pointer txa beq 15$ 11$: rts 14$: ldw A9,#FileBuf 15$: jmp FileOpen 0P0 FileOpen: mvw A9,R6 ; now look for file on disk ldb $886e,#$ff jsr FindFile ; open the file txa beq 11$ jmp FError 11$: jsr MvNm2Bar jsr CardInit ldy #$16 lda $8400,y ; check for geos file type beq 12$ jmp GEOFinit ; a GEOS file type!! 12$: ldy #0 ; check non-geos file type lda $8400,y and #%10111111 ; mask wr-protect bit cmp #$81 ; $80 or lower is bad bge 14$ 13$: jsr i_CNCLBox ; bad non-geos file type exit .word BadTpTxt jmp ClosWin2 14$: cmp #$83 blt 15$ ; another bad type=usr/rel/etc jsr NativeDir bne 13$ ; but it must be native... rts 15$: iny ; copy track and sector over lda $8400,y sta PgCards-1,y iny lda $8400,y sta PgCards-1,y ; copy sector ldw A0,#PgCards ; first page is current page mvw CurCard,A1 jsr CopyCard ; now ready to read page jsr i_WinAct ; activate our new screen .byte 2 ldb PageNum,#1 ; makes it official! lda #ST_WR_FORE jsr RdBxMeat jsr NewPage ; open the first page? now? txa bne 17$ ;jsr i_WinAct ; activate our new screen ;.byte 2 17$ rts BadTpTxt: .byte $18,"File is not readable.",27,0 e is not readable.",27,0 7,0 7,0 0P0 NativeDir: cmp #$86 beq 10$ ; directories MIGHT be ok rts 10$: jsr IsNative beq 11$ rts 11$: lda PageNum ; if file open, CLOSE IT beq 12$ jsr ClosWin2 12$: jsr ElimDAs  13$: lda #(5|64) jsr $9d80 ; get new kernal jsr $5015 jsr $9d83 ; restore kernal  21$: jsr NewDrv jsr DrawWin1 ldx #0 ; report no error, please rts limDAs: cpb curDrive,DAABdrv bne 13$ lda #VERTICAL | 1 sta DAABMenu+6 ; eliminate menus? lda #15 + (1*14) sta DAABMenu+1 13$: rt0P0 CardInit: ldw PgCard,#PgCards ldw CurCard,#PgCards+26 ldw A0,#DefCard ldw A1,#PgCards CopyCard: ldy #0 10$: lda (A0),y ; copy page card info sta (A1),y iny cpy #26 blt 10$ rts  MvNm2Bar : 0P0 ldw A3,#RDTBtxt ldx #A9 ldy #A3 jmp CopyString ; copy new titlebar fm filename t no error, please rts or lower is bad bge 14$ 13$: jsr i_CNCLBox ; bad non-geos file type exit .word BadTpTxt jmp ClosWin2 14$: cmp #$83 blt 15$ ; another b0P0 GEOFinit: ldy #$15 ; check VLIR type lda $8400,y ; VLIR data type? bne 10$ jmp GEOFcSEQ ; check SEQ geos type 10$: ldb TransTyp,#1 ; signify geos translation ldw R9,#$8400 jsr GetFHdrInfo ; read the header info cpx #0 beq 15$ jmp FError 15$: jsr GEOFcVLv ; check for viewable geos type beq 16$ jmp GEOFVLIe 16$: mvw R1,LastSec ldw R4,#VBuf ; read the vlir sector jsr GetBlock cpx #0 beq 20$ jmp FError 20$: jsr GEOFcVLb ; inspect the VLIR block ldb VBuf,#0 jsr NxVLIRPg beq 25$ jsr i_CNCLBox .word GEOFtxt2 jmp ClosWin2 25$: mvw R1,PgCards ; copy track and sector over ldw A0,#PgCards ; first page is current page mvw CurCard,A1 jsr CopyCard ; now ready to read page jsr GEOFVLIs ; get right start byte sta PgCards+2 jsr i_WinAct ; activate our new screen .byte 2 ldb PageNum,#1 ; makes it official! lda #ST_WR_FORE jsr RdBxMeat jsr NewPage ; open the first page? now? txa bne 30$ ; error conditions can go here ;jsr i_WinAct ; activate our new screen ;.byte 2 30$: rts GEOFtxt2: .byte $18,"No pages found?!",27,0 "No pages found?!",27,0 ,0 ,0 .",27,0 7,0 7,0 0P0 GEOFcVLv: ldb Temp3,#0 ; continue geos file eval ldw A0,#GEOFtyps ldw A1,#$814d 10$: cwi A0,#GEOFlast bge 99$ ; this is bad ldy #0 11$: lda (A0),y ; if null, then done beq 30$ cmp (A1),y ; compare to actual file type bne 20$ iny bne 11$ 20$: ldy #0 ; no match, so go to next word inc Temp3 21$: inw A0 ; find the end of search pattern lda (A0),y bne 21$ inw A0 ; and increment past the null bra 10$ ; and jump up to next word 30$: mvb Temp3,GeosTyp ldx #0 rts 99$: ldx #$ff rts GEOFtyps: .byte "Write Image",0 .byte "text album",0 .byte "photo album",0 .byte "Notes",0 .byte "Paint Image",0 GEOFlast: .byte "last",0 0P0 GEOFcVLb: lda GeosTyp ; all albums lose their last sector beq 99$ cmp #3 bge 99$ ; albums are codes 1-2 lda #0 sta VBuf 10$: jsr IsNxVLIR ; find the last link bne 20$ jsr NxVLIRPg bra 10$ 20$: ldy VBuf ; now lose the last link lda #0 sta VBuf,y ; clear out last VLIR link -- names iny sta VBuf,y 99$: lda #0 ; reset VBuf pointer sta VBuf rts GEOFVLIs: lda TransTyp ; is it a GEOS type? cmp #1 bne 99$ lda GeosTyp ; text albums lose their 2 bytes beq 99$ ; but geoWrite docs do not cmp #1 beq 98$ ; text album is code 1 cmp #3 ; notes are code 3 bge 99$ 98$: lda #3 rts 99$: lda #1 rts rts a #3 rts 99$: lda #1 rts rts rts a #3 rts 99$: lda #1 rts rts rts ; get right start byte sta PgCards+2 jsr i0P0 GEOFcSEQ: GEOFVLIe: GEOFexec: ldy #$16 ; check GEOS type lda $8400,y ; what kind is it? cmp #$06 beq 20$ ; application cmp #$14 beq 20$ ; AutoExec cmp #$05 beq 30$ ; desk acc jsr i_CNCLBox ; temporary .word GEOFtxt jmp ClosWin2 20$: ldw A2,#GEOFtxt1 jsr YNBox cbi sysDBData,#4 bne 21$ rts 21$: ldb R0L,#0 ; set "run" flag ldw R7,#0 ; figure out load address yourself mvw A9,R6 ; get the filename jmp GetFile ; bye bye, now. 30$: phw A9 jsr ClosWin2 jmp DAABrun2 GEOFtxt: .byte $18,"Unsupported GEOS type.",27,0 GEOFtxt1: .byte $18,"Switch to this application?",27,0 cation?",27,0 1 rts GEOFlast: .byte "last",0 w CurCard,A1 jsr CopyCard ; now ready to read page jsr GEOFVLIs ; get right start byte st0P0 IsNxVLIR: cbi VBuf,#122 ; any more to find? bge 99$ ; no, so exit ldy VBuf iny ; load index and move forward 10$: iny cpy #124 ; down to last record? bge 99$ lda VBuf,y ; is track null? beq 11$ sta R1L ; no, so check next one iny lda VBuf,y sta R1H ; its good, so get sector & exit dey ldx #0 rts 11$: iny ; worth checking next one...? lda VBuf,y bne 10$ 99$: ldx #$ff ; nope, so exit! rts IsPvVLIR: cbi VBuf,#3 ; any possible previous pages? blt 99$ ldy VBuf iny 10$: dey dey dey cpy #2 ; anything previous? blt 99$ lda VBuf,y ; is there a track? beq 11$ ; no.. so skip sta R1L iny lda (R0),y ; get sector and exit sta R1H dey ldx #0 rts 11$: iny ; are we done? lda (R0),y bne 10$ ; no, so keep looking... 99$: ldx #$ff rts NxVLIRPg: jsr IsNxVLIR bne 20$ sty VBuf ; save new index jsr ClrTBUF ldx #0 20$: rts PvVLIRPg: jsr IsPvVLIR bne 10$ sty VBuf ; save new index  jsr ClrTBUF  ldx #0 0P010$: rts ClrTBUF: ldy #0 tya 10$: sta TBuf,y dey bne 10$ ldy VBuf rts 0P0 NxtSector: jsr SetCurSc ; read the next sector mvw R1,LastSec jsr GetBlock txa rts ; return real live disk error SetCurSc: ldw R4,#TBuf mvw CurCard,A6 ; set up a pointer to current ldy #0 ; sector for this page lda (A6),y sta R1L iny lda (A6),y sta R1H rts NxtByte: mvw CurCard,A6 ldy #2 ; fetch byte pointer lda (A6),y clc adc #1 ; increment byte pointer sta (A6),y bcc 90$ ; overflow to next sector coming lda TBuf bne 12$ ; handle $00,$FF pages beq 10$ 90$: tay lda TBuf ; is this last sector? bne 11$ ; no, so get byte cpy TBuf+1 ; check for eof ble 11$ 10$: ldx #11 rts ; end of file exit! 11$: ldx #0 lda TBuf,y ; get the byte and exit rts 12$: ldy #0 lda TBuf ; set up next track & sector sta (A6),y iny lda TBuf+1 sta (A6),y jsr NxtSector txa bne 13$ ldy #2 lda #1 sta (A6),y jmp NxtByte 13$: rts ; return a disk error! Lo0P0 FilePvew: jsr NxtSector ; preview a file for type analysis txa bne 900P0 FilePvew: jsr NxtSector ; preview a file for type analysis txa bne 90$ jsr NxtByte ; get first 2 bytes out of way sta Temp2 jsr NxtByte sta Temp2+1 jsr NxtByte sta ThisChr cpx #0 beq 10$ ; this means 1 char txt files bad! 90$: ldb PageNum,#0 jsr FError jsr ClosWin2 ; +0 total chars ldx #$ff 91$: rts 10$: jsr LSPKTest beq 91$ ; check for LS packed file lda #0 ; +1 total control/all garbage ldy #7 ; +2 total numeric/symbol 11$: sta Temp1-1,y ; +3 total C= lower/ASCII upper ylp 11$ ; +4 total ASCII lower/ C= gfx 12$: lda ThisChr ; +5 total C= only controls inc Temp1 ; +6 total C= uppercase ldx #2 cmp #13 beq 14$  cmp #9 beq 14$  cmp #10 0P0 beq 14$ ; build counters ldx #1 13$: cmp PvewCht-1,x bge 15$ 14$: inc Temp1,x bne 19$ inc Temp1,x bra 19$ 15$: inx cpx #7 blt 13$ inc Temp1+5 19$: cbi Temp1,#230 ; got 230 characters yet? bge 20$ jsr NxtByte ; no, so get next byte sta ThisChr txa beq 12$ ; evaluate next byte cpx #11 ; was it just an eof? bne 90$ 20$: jmp FilePv2 nop able.",27,0 ved PrintString Y TextX: .block 2 ; saved PrintString X LastY: .block 1 ; above line variable TopOfPg: .block 1 DispBuf: .block 1 ; save dispBufferOnyour right boundry! 0P0 FilePv2:  20$: ldb A0L,#0 ; now build eval byte ldy #6 21$: lda Temp1,y clc beq 22$ sec 22$: rol A0L ylp 21$ lda A0L ldx #0 23$: cmp PvewCht2,x bne 24$ lda PvewCht2 + 1,x sta TransTyp ldx #0 rts 24$: inx inx cpx #2 * 12 blt 23$ ldb TransTyp,#4 ; assume binary otherwise ldx #0 rts LSPKTest: lda Temp2 ; loadstar filename eval bne 99$ cbi Temp2+1,#128 bne 99$ cbi ThisChr,#13 bne 99$ ldy #0 lda (A9),y cmp #80 ; p bne 99$ iny lda (A9),y cmp #46 ; . bne 99$ ldb TransTyp,#5 ; petskii -- translation takes care ldx #0 rts 99$: ldx #$ff rts PvewCht: .byte 32,65,96,127,193,219 PvewCht2: .byte %00111111,4,%00100110,3,%00001110,2,%00001100,2 .byte %00100100,3,%00100010,3,%00100000,3,%00000100,3 .byte %00000110,3,%00001000,2,%00001010,2,%00110110,3 inc Temp1+5 19$: cbi Temp1,#230 ; got 230 characters yet? bge 20$ jsr NxtByte ; no, so get next byte sta ThisChr txa beq 12$ ; evaluate next byte cpx #11 ; was it just an eof? bne 90$ y 0P0 NewPage: lda PageNum ; is a file even opened? beq 10$ lda TransTyp ; yes, but has it been evaluated? bne 11$ jsr FilePvew ; no, so evaluate it a little txa beq 11$ 10$: rts 11$: ldw R1,#PageBuf ldw R0,#TheFont - PageBuf jsr ClearRam ; clear out this pages buffer ram lda TransTyp cmp #4 ; now, is it binary? bne 13$ ldb PageNum,#0 jsr i_CNCLBox ; binary file type exit .word BadTpTxt 12$: jsr ClosWin2 ldx #$ff ; send back an error rts 13$: mvw PgCard,A0 ; restore track/sector info mvw CurCard,A1 jsr CopyCard ; now ready to read page jsr NxtSector txa bne 12$ ; an errorful exit reading sector ldb dispBufferOn,#ST_WR_FORE jsr RedyWin2 jsr SizeArea ; prepare cursor location ldx #6 14$: lda R2 - 1,x ; $06 is R2L sta WinSave - 1,x dex bne 14$ lda #0 sta ShowPg ; clear show mode jsr SetPattern ; clear out space for new page inc R2H jsr Rectangle mvb WinSave,TextY mvw WinSave+2,TextX jsr SetupPg cbi TransTyp,#1 bne 99$ cbi GeosTyp,#2 ; 2 is PhotoAlbum bne 20$ jmp ShowScrap 20$: cmp #4 bne 99$ jmp ShowPaint 99$: ; ** here is where page card stuff for fonts done card stuff for fonts done ne ne last CR TSB bra 75$ ; continue, page not done 45$: mvw A2,A3 ; make sure 0 goes right 50$:0P0 BytLp: mvb ThisChr, PrevChr mvb ThisCod, PrevCod BytLp2: jsr GfxSvTSB ; save char following eow jsr NxtByte ; get a byte sta ThisChr stx ThisErr cpx #0 ; yes, this line is necessary! beq 20$ ; evaluate errors cpx #11 ; eof, so skip out beq 60$ ldb PageNum,#0 jsr FError ; bad error, so exit jsr ClosWin2 ldx #$ff ; send back an error jmp DoneWBPg 20$: jsr TrnsLate ; begin logic here bne 25$ ; non-null code gets more eval jsr NotesEnd beq 27$ lda ThisChr ; force an EOW on null char bne BytLp2 ; other nulls end the fun 25$: jsr ChkEOP bge 50$ ; make a quick line check 27$: lda PrevChr beq 75$ ; null char still ends the fun 30$: jsr AddLettr cwi A3,#TheFont - 1 ; if out of buff space, stop blt 35$ ; still space, so continue ldb ThisErr,#11 ; overflow, so fake an EOF 35$: lda ThisCod ; remaining null codes are ok beq 55$ ; code 0 detected (nothing?) cmp #3 ; check for end of word code too bge 55$ ; eow code detected cbi PrevCod,#3 bge 55$ ; previous was an eow jmp BytLp ; no eow, so loop back up 40$: jsr BytNL ; end of line, check page bge 50$ ; page done, get outa here jsr SvTSB ; save the last CR TSB bra 75$ ; continue, page not done 45$: mvw A2,A3 ; make sure 0 goes right 50$: jsr LdTSB ; restore last word pointer & exit lda #0 jsr AddLettr jmp DoneWBPg 55$: cpw A2,A3 ; special case bne 60$ jmp BytLp ; no eow, so loop back up 60$: cbi PrevCod,#4 ; try an EOLN thing beq 40$ 62$: jsr DoEOW ; begin word show here!!! bge 45$ ; show the word NOW cbi ThisCod,#3 blt 70$ 69$: jsr SvTSB ; save char following eow 70$: jsr SayString cbi ThisErr,#11 beq 50$ ; was end of file 75$: mvw A3,A2 sec jsr ESCeval jsr ChkEOP bge 50$ ; make a quick line check jmp BytLp ; go back up and get another wd 0P0 BytNL: cbi ThisChr,#10 ; the great linefeed controversy bne 10$ cbi PrevChr,#13 beq ChkEOP 10$: cbi ThisChr,#13 ; reversed as well? bne 20$ cbi PrevChr,#10 beq ChkEOP 20$: mvw WinSave+2,TextX ; next line! mvb TextY,LastY adb curHeight,TextY inc TextY ; and one more for good measure ChkEOP: cpb TextY,WinSave+1 rts SetupPg: mvb WinSave,TextY ; top into first line mvw WinSave+2,TextX ; left into X ldw A2,#PageBuf ldw A3,#PageBuf ; set up new page buffer ldb ThisChr,#0 ; set up misc vars sta ThisCod sta TopOfPg ;sta HTMflags mvw PgCard,A6 ; set up for new display jsr NewCard2 mvw CurCard,R0 ldy #25 lda (R0),y ;sta HTMstate jsr BytNL rts DoEOW: lda #0 ; terminate the word tay sta (A3),y mvw A2,R0 ; got a word! jsr GetStrWidth mvw APITemp2,Temp2 adw TextX,APITemp2 ; is word gonna fit? cpw APITemp2,WinSave+4 blt 10$ ; no, so try an EOLN jsr BytNL ; end of page reached--bad news 10$: rts NotesEnd: lda ThisChr ; force an EOW on null char bne 10$ cbi TransTyp,#1 ; special case for NOTES bne 10$ cbi GeosTyp,#3 bne 10$ ldb ThisErr,#11 sta PrevCod ; just a dummy value != 4 ldx #0 10$: rts rts bra 75$ ; continue, page not done 45$: mvw A2,A3 ; make sure 0 goes right 50$: jsr LdTSB ; re0P0 LdTSB: jsr SetCurSc ldy #0 20$: lda TckSave,y ; restore last word t&s&b sta (A6),y iny cpy #3 blt 20$ rts SvTSB: jsr SetCurSc ldy #0 90$: lda (A6),y sta TckSave,y ; save t&s of end of last word iny cpy #3 blt 90$ ; and save the byte rts GfxSvTSB: jsr SetCurSc ldy #0 90$: lda (A6),y sta TckSave+4,y ; save t&s of end of last word iny cpy #3 blt 90$ ; and save the byte rts GfxLdTSB: ldy #0 20$: lda TckSave+4,y ; restore last word t&s&b sta TckSave,y iny cpy #3 blt 20$ rts ^n0P0 ShowScrap: jsr NxtSector ; read in initial scrap data cpx #0 bne 10$ jsr GfxPtH ; get some window height info sbb curHeight,Temp3 ; cut total height by one char mvb Temp3,R2H jsr GfxPt2 ; 0P0 ShowScrap: jsr NxtSector ; read in initial scrap data cpx #0 bne 10$ jsr GfxPtH ; get some window height info sbb curHeight,Temp3 ; cut total height by one char mvb Temp3,R2H jsr GfxPt2 ; call the geowrite scrap view ldb ThisErr,#11 ; fake an EOF for this one jsr DoneWBPg ; then exit happily 10$: rts GfxPtH: ldb Temp1+1,#0 ; start checking dimensions sta Temp3+1 mvb WinSave+1,Temp1 sta Temp3 sbb TextY,Temp1 ; get Y remaining word in Temp1 sbb WinSave,Temp3 ; window height in Temp3 rts cter 15$: lda Trans2,x 16$: sta ThisChr GetCCod: tax lda CodeChrt,x sta ThisCod bne 10$ ldb ThisChr,#0 10$: lda ThisChr rts #0 10$: lda ThisChr rts s s #0 10$: lda ThisChr rts s jsr BytNL ; end of page0P0 AddLettr: ldy #0 ; save the word byte sta (A3),y inw A3 rts TrnsLate: lda ThisChr ldx TransTyp cpx #5 ; LoadStar packed translation beq 10$ cpx #3 0P0 bne GetCCod ; PETSKII->ASCII translation 0P0 tax lda Trans3,x bra 16$ 10$: tax ; try to translate lda Trans1,x beq 15$ cmp #$ff bne 11$ ; these will be one space lda #32 bne 16$ 11$: pha lda PrevChr jsr AddLettr cbi PrevCod,#4 bne 14$ mvw A3,A2 ; handle last char CRs jsr BytNL 14$: pla sta PrevChr ldb PrevCod,#1 ; assume its an ok character 15$: lda Trans2,x 16$: sta ThisChr GetCCod: tax lda CodeChrt,x sta ThisCod bne 10$ ldb ThisChr,#0 10$: lda ThisChr rts u0P0P0 DoneWBPg: DoneWPg: jsr UseSystemFont ; done on end of read/display ldb currentMode,#0 ldy #0 ; put a NULL on the end tya sta (A3),y rts NewCard: mvw CurCard,A6 NewCard2: ldy #3 lda (A6),y sta Temp1 ; font ID, part 1 iny lda (A6),y sta Temp1+1 ; font ID, part 2 iny lda (A6),y sta currentMode ; new style cwi Temp1,#0 beq 10$ ; null font id cwi Temp1,(9*256) beq 10$ ; mixed up BSW id cwi Temp1,#9 bne 11$ ; correct BSW id 10$: jsr UseSystemFont rts 11$: ldw A1,#FontTab ; point to first font in table 12$: mvw A1,A2 ldy #0 lda (A1),y beq 10$ ; no more fonts.. we're done! 13$: lda (A2),y ; find this fonts data pha inw A2 pla bne 13$ 14$: ldy #0 lda (A2),y ; first check if real font id bne 16$ iny lda (A2),y bne 16$ avw #2,A2 ; end of this fonts ids, so nxt fnt mvw A2,A1 bra 12$ 15$: avw #2,A2 ; check next font id bra 14$ 16$: ldy #0 lda (A2),y cmp Temp1 ; compare against desired id bne 15$ iny lda (A2),y cmp Temp1+1 ; compare against desired 2nd id bne 15$ jmp LdFonTA1 id bne 15$ iny lda (A2),y cmp Temp1+1 ; compare against desired 2nd id bne 15$ jmp LdFonTA1 eight ;dec Temp1 lda R2L ; get your width cmp Temp1 blt 16$ sec sbc Temp1 sta R11H ; got your right boundry! 0P0 SayString: mvw TextX,R11 mvb TextY,R1H sta TopOfPg ; set NOT top of page flag mvw A2,R0 jsr PutString mvw R11,TextX ; fake the move right mvb R1H,TextY 10$: rts LdFonTA1: cpw A1,FontTab1 ; is font on app drive? bge 10$ lda DAABdrv jsr SetDevice ; open the app drive 10$: mvw A1,R0 jsr OpenRecordFile cpx #0 beq 12$ 11$: jsr UseSystemFont ; error opening record, so BSW! lda FileDrv jsr SetDevice ; set back to file drive and exit rts 12$: lda Temp1 ; hopefully this is point size and #63 ; mask lower 6 bits jsr PointRecord ; go to the correct record cpx #0 bne 11$ ; errorful exit ldw R2,#TheFontE-TheFont ldw R7,#TheFont jsr ReadRecord ; read in the font!!! cpx #0 bne 11$ ldw R0,#TheFont jsr LoadCharSet ; make it the font!! lda TextY sub LastY ; now consider new Y line sec sbc #1 ; now have old height cmp curHeight bge 13$ ; got smaller, so don't worry mvb LastY,TextY adb curHeight,TextY ; calculate new bottom line inc TextY 13$ lda FileDrv jsr SetDevice ; set back to file drive and exit rts 10$ cbi GeosTyp,#3 bne 10$ ldb ThisErr,#11 sta PrevCod ; just a dummy value != 4 ldx #0 10$: rts bra 75$ ; continue, page not done 45$: mvw A2,A3 ; make sure 0 goes right 50$: jsr LdTSB ; re0P0 ShowPage: lda PageNum bne 90$ rts ; file/page not opened yet! 90$: cbi TransTyp,#1 bne 10$ cbi GeosTyp,#2 ; if a photo album, re-read bne 91$ jmp NewPage 91$: cmp #4 ; Paint Images also re-read bne 10$ jmp NewPage 10$: ldb dispBufferOn,#ST_WR_FORE jsr RedyWin2 jsr SizeArea ; get our window dimensions ldx #6 11$: lda R2 - 1,x ; $06 is R2L cmp WinSave - 1,x beq 12$ jmp NewPage 12$: dex ; has window changed shape? bne 11$ 13$: lda #0 jsr SetPattern ; clear out space for new page inc R2H jsr Rectangle jsr SetupPg inc ShowPg ; set show page mode dew A3 ; so lookaheads are possible jmp ShowLp ; now to the fun nop sr ESCeval ; check for escape chars bne 26$ dew A3 26$: jsr ChkEOP bge 24$ ; make a quic0P0 ShowLp: mvb ThisChr, PrevChr ; begin the re-show mvb ThisCod, PrevCod ldy #1 15$: lda (A3),y ; get a new character sta ThisChr jsr GetCCod ; encode it inw A3 lda PrevCod beq 25$ ; if last char undoable, loop lda ThisCod beq 16$ cmp #3 bge 16$ cbi PrevCod,#3 blt ShowLp 16$: cpw A2,A3 beq ShowLp cbi PrevCod,#4 ; if going to show an end, do it beq 23$ jsr DoEOW ; otherwise, try to end the word blt 17$ jmp DoneWPg ; unexpected end of page! 17$: jsr SayString ; print it out now! lda ThisChr ldy #0 sta (A3),y ; restore last character 22$: lda ThisChr beq 24$ ; another end of page 25$: mvw A3,A2 clc jsr ESCeval ; check for escape chars bne 26$ dew A3 26$: jsr ChkEOP bge 24$ ; make a quick line check jmp ShowLp ; go back up and get another wd 23$: jsr BytNL ; yes, so end line--check page blt 22$ jsr BytNL ; end line--check page 24$: jmp DoneWPg ; unexpected end of page! end of page! ge! ; unexpected end of page! LdTSB rts ines to skip sta R12H0P0 ESCeval: php cbi TransTyp,#1 ; is file type GEOS bne 10$ cbi ThisCod,#5 ; was this code an escape code? beq 12$ 10$: plp ldx #$ff ; the nothing happened return rts 12$: cbi ThisChr,#9 ; was it a tab? bne 13$ plp jsr DoTab ; yes, so do a tab jsr TabXit bra 98$ 13$: cmp #16 ; was it a graphics escape? bne 14$ plp jsr DoGfxEsc ; yes, so do a graphic pic  bra TabXit  14$: cmp #23 ; was it a newcardset? 0P0 bne 15$ plp jsr DoNewCrd ; yes, so do a new cardset  bra TabXit  15$: cmp #17 ; was it a ruler escape 0P0 bne 16$ plp jsr DoRuler ; yes, so do a new ruler bra TabXit 16$: 98$: ldx #$ff ; the nothing happened flag rts TabXit: ldb ThisChr,#0 ; we'll process it laters... ldb ThisCod,#0 mvw A3,A2 ldx #0 ; the something happened flag! rts o0P0 DoTab: bcc 10$ ; eval a tab character lda #9 jsr AddLettr 10$: mvw CurCard,A0 ldy #6 11$: sty Temp1 lda (A0),y ; look 0P0 DoTab: bcc 10$ ; eval a tab character lda #9 jsr AddLettr 10$: mvw CurCard,A0 ldy #6 11$: sty Temp1 lda (A0),y ; look for non-null tabs bne 12$ iny lda (A0),y bne 12$ iny cpy #22 ; have we checked ALL tabs? blt 11$ mvw TextX,Temp2 ; no tabs, so generate one! avw #8,Temp2 ; add a reasonable amount bra 13$ 12$: ldy Temp1 lda (A0),y ; look for non-null tabs sta Temp2 ; found one! iny lda (A0),y and #$7f ; filter the decimal alignment sta Temp2+1 iny adw WinSave+2,Temp2 cpw Temp2,TextX ; is tab is too far left? ble 11$ 13$: cpw Temp2,WinSave+4 ; is tab too far right? bge 14$ mvw Temp2,TextX ; make the new tab! 14$: rts ; and exit q0P0 DoRuler: bcc 11$ ; does rest nee0P0 DoRuler: bcc 11$ ; does rest need to be read? lda ThisChr jsr AddLettr ; add the escape to the pile ldb Temp2,#0 10$: jsr NxtByte cpx #0 bne 99$ jsr AddLettr inc Temp2 cbi Temp2,#26 blt 10$ 11$: mvw A2,A3 ; make sure pointing to end! avw #27,A3 mvw CurCard,R0 avw #1,R0 ldy #5 12$: lda (A2),y ; copy data into current card sta (R0),y iny cpy #24 ; 24+1=the end blt 12$ 99$: rts the end blt 12$ 99$: rts the end blt 12$ 99$: rts ment sta Temp2+1 iny adw0P0 DoNewCrd: bcc 11$ ; does rest need to be read? lda ThisChr jsr AddLettr ; add the escape to the pile ldb Temp2,#0 10$: jsr NxtByte cpx #0 bne 99$ jsr AddLettr inc Temp2 cbi Temp2,#3 blt 10$ 11$: mvw A2,A3 ; make sure pointing to end! avw #4,A3 mvw CurCard,R0 avw #2,R0 ; so points to right place ldy #1 12$: lda (A2),y ; copy data into current card sta (R0),y iny cpy #4 blt 12$ jsr NewCard 99$: rts rts ; filter the decimal alignment sta Temp2+1 iny adw0P0 DoGfxEsc: bcc ChkPt ; does rest need to be read? 0P0 lda ThisChr jsr AddLettr ; add the escape to the pile ldb Temp2,#0 10$: jsr NxtByte cpx #0 beq 99$ rts 99$: jsr AddLettr inc Temp2 cbi Temp2,#4 blt 10$ ChkPt: mvw A2,A3 ; make sure pointing to end! avw #5,A3 lda TopOfPg beq 12$ jsr BytNL blt 12$ ldb TextY,#$f0 ; fake a bottoming out jsr GfxLdTSB rts 12$: jsr GfxPtH ldy #2 lda (A2),y sta R2H sta Temp2 ; get the image height word iny lda (A2),y sta Temp2+1 ; image height in Temp2 cpb curHeight,Temp3 ; char taller than whole window? bge 14$ ; can we handle first CR? sbb curHeight,Temp3 ; cut total height by one char cpw Temp2,Temp3 ; can fit in total space? blt 15$ 13$: lda TopOfPg ; should we wait for next page? bne 16$ ; answer is yes. mvb Temp3,R2H bne GfxPt 14$: rts 15$: cpw Temp2,Temp1 ; picture bigger than remaining? blt GfxPt 16$: ldb TextY,#$f0 ; fake a bottoming out jsr GfxLdTSB rts |0P0P0 ;* display a graphics clip from geoWrite GfxPt: jsr SvTSB ; make sure picture not shown 2ce ldy #4 lda (A2),y ; get the record number clc adc #1 ; add one for the blank spot asl a ; now have index into VBuf tax lda VBuf,x ; get the picture track/sector bne 10$ jmp BytNL ; escape on error 10$: sta R1L inx lda VBuf,x sta R1H ; now have the T&S of picture GfxPt2: ldw R4,#$8000 ldw R5,#0 ldw A0,#Temp3+10 ; save registers for ClipRead jsr SaveReg ldw R0,#ClipBuf ; got buf pointer jsr ClipRead ldy #0 lda (R0),y ; got your width sta R2L ; got your height before? jsr ClipRead ; get garbage bytes ldy #0 lda (R0),y ; get low height cmp R2H bge 13$ ; its ok, so continue sta R2H ; adjust image height down 13$: jsr ClipRead mvw WinSave+2,R1 ldy #3 14$: lsr R1H ; divide by eight ror R1L ylp 14$ inc R1L ; got your start x mvb TextY,R1H ; got your start y lda #0 sta R11L ; got your left buf sta R11H sta R12L ; got your scanlines to skip sta R12H mvw WinSave+4,Temp1 ; find window width sbw WinSave+2,Temp1 ldy #3 15$: lsr Temp1+1 ; divide by eight ror Temp1 ylp 15$ ; divide by eight ;dec Temp1 lda R2L ; get your width cmp Temp1 blt 16$ sec sbc Temp1 sta R11H ; got your right boundry! mvb Temp1,R2L 16$: ldw R13,#ClipRead ldw R14,#ClipSync jsr BitOtherClip ; good stinkin luck! ldy #2 lda (A2),y add TextY sta TextY jmp BytNL ispBufferOn,#(ST_WR_FORUUUU///// /%0000 0000 0$0'111 111111 "% 0P0 ClipSync: ldw R0,#ClipBuf ; these routines necessary rts ; for bitotherclip ClipRead: ldw A0,#Temp3 ; see geos prg ref guide for jsr SaveReg ; details ldw A0,#Temp3+10 jsr LoadReg jsr ReadByte ; read next byte for photo scrap ldy #0 sta (R0),y jsr SaveReg ldw A0,#Temp3 jsr LoadReg rts LoadReg: ldy #0 ; restore registers from A0 ldx #0 10$: lda (A0),y sta R1L,x inx iny cpy #10 blt 10$ rts SaveReg: ldy #0 ; save registers to A0 ldx #0 10$: lda R1L,x sta (A0),y inx iny cpy #10 blt 10$ rts h0P0 RdBxClick: jsr i_ChkClick .byte 1 txa bne 11$ ; inside top arrow!! jmp UpArro 11$: jsr i_ChkClick .byte 2 txa bne 13$ ; inside bottom arrow!! jmp DnArro 13$: rts \0P0 RdBxClick: lda PageNum bne 10$ 99$: rts 10$: ldw RdClkRt+1,#UpArro lda #1 jsr RdClickDo beq 99$ 11$: ldw RdClkRt+1,#DnArro lda #2 jsr RdClickDo beq 99$ 13$: jsr IsGeoPaint bne 19$ 15$: ldw RdClkRt+1,#LfArro lda #6 jsr RdClickDo beq 19$ 17$: ldw RdClkRt+1,#RtArro lda #7 jsr RdClickDo beq 19$ nop 19$: rts RdClickDo: sta RdClkBt1 sta RdClkBt2 jsr i_ChkClick ; no RdClkBt1: .byte 2 txa beq 11$ ; inside something? rts 11$: ldb dispBufferOn,#ST_WR_FORE jsr InvertRectangle RdClkRt: jsr DnArro jsr i_ChkClick ; no RdClkBt2: .byte 2 jsr InvertRectangle ldx #0 rts jsr ClipRead ; get garbage bytes ldy #0 lda (R0),y ; get low height cmp R2H bge 13$ ; its ok, so continue sta R2H ; adjust image height do0P0 DnArro: ldb Temp1,#0 ; save a next VLIR flag cbi PageNum,#99 ; run out of pages? bgt 11$ lda ThisErr beq 10$ ; any more pages down? cmp #11 bne 11$ ; was it an EOF? cbi TransTyp,#1 bne 11$ ; is the type GEOS? jsr IsNxVLIR bne 11$ ; are there any more pages? inc Temp1 ; increment next VLIR flag 10$: cbi PageNum,#1 bge 12$ 11$: rts 12$: inc PageNum mvw CurCard,PgCard avw #26,CurCard lda Temp1 ; check next VLIR flag beq 13$ jsr NxVLIRPg ; find next track and sector mvw PgCard,R0 ldy #0 lda R1L ; save track into next currcard sta (R0),y iny lda R1H ; save sec into next currcard sta (R0),y iny jsr GEOFVLIs ; save new byte into nxt currcard sta (R0),y ; and now we're ready! 13$: jsr NewPage bra 11$ 0P0 UpArro: cbi PageNum,#1 bgt 11$ ; any more pages down? 10$: rts 11$: dec PageNum cbi TransTyp,#1 bne 12$ ; is the type GEOS? mvw PgCard,R0 ldx VBuf ; set-up old page pointers ldy #0 lda (R0),y ; is the track as a new page? cmp VBuf,x bne 12$ inx iny lda (R0),y ; is the sector as a new page? cmp VBuf,x bne 12$ iny jsr GEOFVLIs ; get proper start byte cmp (R0),y bne 12$ ; is the byte as a new page? jsr IsPvVLIR bne 12$ ; is there a previous VLIR page? jsr PvVLIRPg ; YES! So decrement VLIR pointer! 12$: mvw PgCard,CurCard svw #26,PgCard jsr NewPage bra 10$ ,CurCard svw #26,PgCard jsr NewPage bra 10$ c into next currcard sta (R0),y iny jsr GEOFVLIs ; save new byte into nxt currcard sta (R0),y ; a0P0 MakeMyVLIR: mvw PgCard,R0 ldx VBuf ; set-up old page pointers ldy #0 lda (R0),y ; is the track as a new page? cmp VBuf,x bne 12$ inx iny lda (R0),y ; is the sector as a new page? cmp VBuf,x bne 12$ 10$: rts ; found 12$: dec VBuf ; not found beq 10$ dec VBuf jmp MakeMyVLIR 0P0 C  oP0 olorPrep: **************** ;* S/geoBrows2 ;* ;* This file contains all of the code for ;* managing the v0P0 .ramsect RDTBtxt: .block 20 PageNum: .block 1 ; page number ShowPg: .block 1 ; show mode 0=no, 1=yes PgCard: .block 2 ; pointer to current card CurCard: .block 2 ; current font/style info PgCards: .block (26 * 150) ; enough cards for 150 pages Windex: .block 2 ; unused? ; the two below are MARRIED to each other :) PageBuf: .block 1500 ; characters for page (1400 min) TheFont: .block 2000 ; actual font data ClipBuf: .block 135 ; bitmap clip buffer TheFontE: .block 1 ; end of Font Buffer TransTyp: .block 1 ; 0=?,1=geos,2=ascii,3=petskii,4=binary GeosTyp: .block 1 ; 0=geowrite,1=text,2=photo,3=paint TBuf: .block 260 ; current sector buffer LastSec: .block 2 ; last track/sector read VBuf: .block 260 ; VLIR link buffer ThisChr: .block 1 ; character being examined ThisCod: .block 1 ; parse code for ThisChr PrevChr: .block 1 ; previous char examined PrevCod: .block 1 ; parse code for PrevChr ThisErr: .block 1 ; disk errors from ThisChr WinSave: .block 6 TckSave: .block 20 ; saving track/sec/byte info TextY: .block 1 ; saved PrintString Y TextX: .block 2 ; saved PrintString X LastY: .block 1 ; above line variable TopOfPg: .block 1 dispBuf: .block 1 ; save dispBufferOnlock 1 ; save dispBufferOnrOnrOnyour right boundry! SB: jsr SetCurSc ldy #0 20$: lda TckSave,y ; restore last word t&s&b sta (A6),y iny cpy #3 blt 20$ rts SvTSB: jsr SetCurSc ldy #0 90$: lda (A6),y sta TckSave,y ; save t&s of end of last word iny cpy #3 blt 90 12$: inc PageNum mvw CurCard,PgCard avw #26,CurCard lda Temp1 ; check next VLIR flag beq 13$ jsr NxVLIRPg ; find next track and sector mvw PgCard,R0 ldy #0 lda R1L ; save track into next currcard sta (R0),y iny ldaS/geoBrowHTM;PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&960P ;****************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman ;* ;* This file contains the base ;* code for "HTML" reading. ;* Lexical analysys is handed ;* by the geoBrowser system ;* already (for word wrap). ;* However, none of this works ;* right now, and I'm outa memory. ;****************************** .noeqin .if Pass1 .include GEOSequates .endif .glbl .eqin .psect endif .glbl .eqin .psect ect .endif .glbl .eqin .psect .e0P0 HTMSvTSB: ldy #0 10$: lda TckSave+4,y ; restore last word t&s&b sta TckSave+8,y iny cpy #3 ; save track and sector blt 10$ ldx #0 20$: lda A2L,x sta TckSave+8,y iny ; then the A2,A3 pair inx cpx #4 blt 20$ rts HTMLdTSB: lda HTMstate ; set back-up mode and #%1000000 ; set virtual state 0 ora #%0000010 ; then turn on back-up bits sta HTMstate lda ShowPg beq 10$ lda ThisChr ; save last character ldy #0 sta (A3),y 10$: ldy #3 ldx #0 11$: lda TckSave+8,y sta A2L,x iny ; then restore the A2,A3 pair inx cpx #4 blt 11$ ldb PrevChr,#0 ; clear the previous character lda ShowPg beq 20$ ldy #0 lda (A3),y ; restore show page and exit sta ThisChr rts 20$: mvw CurCard,R1 ldy #0 21$: lda TckSave+8,y ; restore last word t&s&b sta TckSave+4,y ; restore them all sta TckSave,y sta (R1),y ; restore file pointer iny cpy #3 ; restore track and sector blt 21$ jsr SetCurSc cpw R1,LastSec beq 22$ jsr GetBlock ; re-get the right block 22$: rts ; exit happy, dammit window width sbw WinSave+2,Temp1 ldy #3 15$: lsr Temp1+1 ; divide by eight ror Temp1 ylp 15$ ; divide by eight ;dec Temp1 lda R2L ; get your width cmp Temp1 blt 16$ sec sbc Temp1 sta R11H ; got your right boundry! 0P0 HTMchk: rts ; ** abort html! remove!! cbi ThisChr,#'<' ; don't bother if no "<" bne 10$ lda HTMstate ; if already in state, no save lsr a bcs 10$ jsr HTMSvTSB ; ok, save place 10$: rts HTMLeval: ldx #$00 ; *** abort the html eval rts ; *** remove these two lines lda HTMstate ; if in HTM mode, proceed lsr a bcs 12$ ldy #0 ; not in mode, should be? lda (A2),y cmp #'<' bne 11$ ; no, so display at will lda HTMstate ora #%00000001 ; "<" found, so htm mode! sta HTMstate ldb HTMmode,#0 ; clear html mode 10$: ldx #$ff ; no display exit rts 11$: ldx #$00 ; allow display for now rts 12$: lsr a bcc 13$ ; check back-up mode clc rol a ; backing up, so finish it rol a sta HTMstate ; clear the HTMstate ldx #$00 ; allow backup print, exit rts 13$: sta HTMstate+1 ; save "real" state ldw R0,#HTMTable HTMLp: 14$: ldy #0 lda (R0),y ; grab the state tax beq 51$ 50$: dex cpx HTMstate+1 ; dec to get "real" state beq 51$ ; not it, so possibly cont avw #6,R0 cpw R0,HTM1 ; any more commands blt 14$ lda #1 ; no more commands, so back up(cmd#1) bne 52$ 51$: iny lda (R0),y ; get the command 52$: HTMCMD: asl a ; multiply by two tax lda HTMcmds,x ; get the routine LB pha inx lda HTMcmds,x ; and the routine HB tax pla jmp CallRoutine ; now go to it r BitOtherClip ; good stinkin luck! ldy #2 lda (A2),y add TextY sta TextY jmp BytNL sr BytNL ; end line--check page 24$: jmp DoneWPg ; unexpected end of page! word show here!!! bge 45$ ; 0P0 HTMcmds: .word HTMabort ; command 0 .word HTMback ; command 1 .word HTMisWd ; command 2 .word HTMnewSt ; command 3 .word HTMback .word HTMback HTMabort: ldx #$ff ; abort, no display rts HTMback: jsr HTMLdTSB ldx #$ff rts HTMGtPar: ldy #2 lda (R0),y sta A1L iny lda (R0),y sta A1H rts HTMisWd: jsr HTMGtPar mvw A2,R1 ; compare to given string ldx #R1 ldy #A1 jsr CmpString beq 20$ jmp HTMback ; bad compare so exit 20$: ldy #4 lda (R0),y jmp HTMCMD HTMnewSt: ldy #5 lda (R0),y asl a asl a ; put new state in proper form sec sbc #$01 ; and subtract one ora #%00000001 ; make sure in found mode sta HTMstate ldx #$ff rts HTMTable: ; state (0=all states, otherwise state # + 1) ; command (see HTMcmds on previous page) ; string pointer or function pointer or 0 ; success command ; success parameter .byte 1,2,[HTM7,]HTM7,3,2 ; 1,"html"->2 .byte 2,2,[HTM2,]HTM2,3,32 ; 2,">"->32 HTM1: .byte "<",0 HTM2: .byte ">",0 HTM3: .byte " ",0 HTM4: .byte 13,0 HTM5: .byte "/",0 HTM7: .byte "html",0 ; no more commands, so back up(cmd#1) bne 52$ 51$: iny lda (R0),y ; get the command 52$: HTMCMD: asl a ; multiply by two tax lda HTMcmds,x ; get the routine LB pha inx lda HTMcmds,x ; and t0P0 .ramsect  HTMstate: .block 2 ; state of HTML parse HTMmode: .block 1 ; general HTML mode HTMflags: .block 1 ; will define later 0P0x #$ff ; abort, no display rts HTMback: jsr HTMLdTSB ldS/geoBrows3;#PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&!^*c78X ;****************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman  ;* 8X;* All geoPaint support ;****************************** .noeqin .if Pass1 .include GEOSequates .endif .glbl .eqin .psect owever, none of this works ;* right now, and I'm outa memory. ;****************************** .noeqin .if Pass1 .include GEOSequates .endif .glbl .eqin .psect .endif .glbl .eqin .psect ect .endif .glbl .eqin .psect .e8X0 ShowPaint: jsr UnColor ldb ThisErr,#0 jsr MakeMyVLIR jsr RedyWin2 jsr SizeArea ; prepare cursor location jsr GPBoxPrep jsr GPColorPrep jsr GPColPrep GPPaintLp: ldb GPYCount,#8 ldb GPCCount,#0 sta GPCNum sta GPRNum 10$: ldw A2,#PageBuf jsr GPReadRec beq 20$ rts 20$: ldw A2,#PageBuf adw ColSkipBt,A2 ldb GPRCount,#2 jsr GPBitLoop ; one record beq 30$ rts 30$: ldw A2,#PageBuf+1288 adw GPColSkip,A2 jsr GPColorLp 40$: ldb GPRCount,#2 ; a new record? jsr GPNextRec beq 50$ rts 50$: jmp GPPaintLp IsGeoPaint: lda PageNum bne 10$ cmp #$ff rts 10$: cbi TransTyp,#1 bne 15$ ; is the type GEOS? cbi GeosTyp,#4 bne 15$ ; is it geoPaint? 15$: rts ; is it geoPaint? 15$: rts rts rts 8X0 GPNextRec: jsr IsNxVLIR beq 45$ 43$: ldb ThisErr,#$ff ; inform prg that this is IT! bne 98$ 45$: jsr NxVLIRPg ; find next track and sector mvw CurCard,R0 ldy #0 lda R1L ; save track into next currcard sta (R0),y iny lda R1H ; save sec into next currcard sta (R0),y iny jsr GEOFVLIs ; save new byte into nxt currcard sta (R0),y ; and now we're ready! jsr NxtSector stx ThisErr txa bne 98$ ; an errorful exit reading sector lda GPYPos add #8 cmp BoxSave+1 bgt 98$ ; fresh row, can we show it?  99$: ldx #0 rts 98$: ldx #$ff ; to mark the END rts Count bne 31$ 32$: ldb GPCount,#8 33$: ldy GPCount lda GPChr,y ldy #0 sta (A2),y inw A2 dec GPCount bne 33$ dec GPCode bne 32$ jmp GPReadRec dRec NxtSe8X0 GPReadRec: cwi A2,#PageBuf+1440 ble 10$ ldx #0 rts 10$: jsr NxtByte cpx #0 beq 13$ rts 13$: cmp #$40 blt 20$ cmp #$80 blt 30$ ; below is a "repeat that byte" and #$7f ; clear that $80 bit sta GPCode jsr NxtByte sta GPChr 15$: lda GPChr ldy #0 sta (A2),y inw A2 dec GPCode bne 15$ jmp GPReadRec 20$: sta GPCode ; raw "bytes that follow" deal 21$: jsr NxtByte ldy #0 sta (A2),y inw A2 dec GPCode bne 21$ jmp GPReadRec 30$: and #$3f ; eight byte "fill pattern" code sta GPCode ldb GPCount,#8 31$: jsr NxtByte ldy GPCount sta GPChr,y dec GPCount bne 31$ 32$: ldb GPCount,#8 33$: ldy GPCount lda GPChr,y ldy #0 sta (A2),y inw A2 dec GPCount bne 33$ dec GPCode bne 32$ jmp GPReadRec dRec NxtSe8X0 GPBitLoop: mvw GPXPos,R3 ; set new x,y mvb GPYPos,R11L lda R3L clc adc #7 sta R4L lda R3H adc #0 sta R4H cpw R4,BoxSave+4 bgt 20$ lda GPRNum ; if we've shown 1 row beq 10$ ; no need to copy new col mvb GPCCount,GPCNum ; so, copy new col 10$: cpb R11L,BoxSave+1 bgt 20$ ldy #0 lda (A2),y jsr HorizontalLine 20$: inw A2 ;cwi A2,#PageBuf+1280 ;ble 25$ ;ldx #0 ;rts 25$: inc GPYPos dec GPYCount beq 30$ jmp GPBitLoop ; not a new card 30$: ldb GPYCount,#8 ; a new card svb #8,GPYPos avw #8,GPXPos inc GPCCount cbi GPCCount,#80 bge 35$ jmp GPBitLoop ; not a new row 35$: ldb GPCCount,#0 ; a new row avb #8,GPYPos mvw BoxSave+2,GPXPos cpb R11L,BoxSave+1 bgt 37$ inc GPRNum 37$: dec GPRCount beq 40$ jmp GPBitLoop ; not a new record 40$: rts 8X0 GPBoxPrep: lda R3L and #%11111000 ; smash the last eight bytes cmp R3L beq 10$ sta R3L avw #8,R3 ; and bumpabyte 10$: lda R2H and #%11111000 sta R2H sta R2H lda R2L and #%11111000 cmp R2L beq 12$ sta R2L avb #8,R2L 12$: mvw R2,BoxSave mvb R2L,GPYPos mvw R3,BoxSave+2 mvw R3,GPXPos mvw R4,BoxSave+4 rts R3,GPXPos mvw R4,BoxSave+4 rts 0 ble 25$ ldx #0 rts 25$: inc GPYPos dec GPYCount beq 30$ jmp GPBitLoop ; not a new card 30$: ldb GPYCount,#8 ; a ne8X0 GPColorPrep: mvw BoxSave+2,GPCBoxX lsr GPCBoxX+1 ; divide by eight ror GPCBoxX lsr GPCBoxX+1 ror GPCBoxX lsr GPCBoxX+1 ror GPCBoxX ; now have col#0-80 mvb BoxSave,GPCBoxY ror GPCBoxY ; divide THIS one by eight ror GPCBoxY ror GPCBoxY ; now have row#0-25 ldw GPCPtrT,#$8c00 ; get c64 pointer ldy GPCBoxY beq 11$ 10$: avw #40,GPCPtrT ; increment 1 row dey bne 10$ 11$: adw GPCBoxX,GPCPtrT ; now we gots it! mvw GPCPtrT,GPCPtrR rts ots it! mvw GPCPtrT,GPCPtrR r8X0 GPColorLp: cwi rightMargin,#330 blt 10$  cbi $c00f,#$40 ; check for Wheels blt 99$ cbi $904f,#$50 ; please blt 99$ jmp GPColor128  99$: rts 10$: jmp GPColor64 sta (A3),y inw A3 20$: inw A2 dec GPCBDex bne 18X0 GPColor64: ldb GPCYDex,#2 sta ColorDirty 11$: mvw GPCPtrR,A3 ldb GPCBDex,#80 mvb GPCNum,GPCXDex inc GPCXDex 15$: lda GPCXDex beq 20$ dec GPCXDex ldy #0 lda (A2),y sta (A3),y inw A3 20$: inw A2 dec GPCBDex bne 15$ avw #40,GPCPtrR dec GPCYDex bne 11$ 99$: rts GPColor128: ldb GPCYDex,#2 sta ColorDirty mvb GPCNum,A4L ; the last X block mvb GPRNum,A4H ; the last Y block adb GPCBoxX,A4L adb GPCBoxY,A4H ; now we gots em 11$: mvb GPCBoxX,A3L ; the current X8X0 GPColor128: ldb GPCYDex,#2 sta ColorDirty mvb GPCNum,A4L ; the last X block mvb GPRNum,A4H ; the last Y block adb GPCBoxX,A4L adb GPCBoxY,A4H ; now we gots em mvb GPCBoxY,A3H ; the current Y block 11$: mvb GPCBoxX,A3L ; the current X block ldb GPCBDex,#80 15$: cpb A3L,A4L bge 20$ mvw A3,R1 ldb R2L,#1 sta R2H ldy #0 lda (A2),y sta R4H jsr $c313 inc A3L 20$: inw A2 dec GPCBDex bne 15$ inc A3H inc GPCBoxY cpb A3H,A4H blt 11$ 99$: rts xY cpb A3H,A4H bl8X0 UnColor: lda ColorDirty bne 10$ rts 10$: cwi rightMargin,#330 ; do Wheels 128 color? blt 20$  cbi $c00f,#$40 ; check for Wheels blt 15$ cbi $904f,#$50 ; please blt 15$  ldw R1,#0 ldb R2L,#80 ldb R2H,#25 mvb screencolors,R4H jsr $c313 ; colorrectangle 15$: ldb ColorDirty,#0 rts ; 128 fix 20$: mvb screencolors,UnC2 jsr i_FillRam .word 1000 .word $8c00 UnC2: .byte 0 ldb ColorDirty,#0 rts 0 ldb ColorDirty,#0 rts rts rts e 0 ldb ColorDirty,#0 rts8X0 GPColPrep: ldb GPColSkip+1,#0 sta ColSkipBt+1 mvb GPColSkip,ColSkipBt asl ColSkipBt rol ColSkipBt+1 asl ColSkipBt rol ColSkipBt+1 asl ColSkipBt rol ColSkipBt+1 rts sl ColSkipBt rol ColSkipBt+1 rts db R2H,#25 mvb8X0 LfArro: mvb GPColSkip,GPCode cpb GPColSkip,GPCNum bgt 10$ ldb GPColSkip,#0 bra 11$ 10$: sbb GPCNum,GPColSkip 11$: cpb GPCode,GPColSkip bne 12$ rts 12$: jmp ShowPage RtArro: mvb GPColSkip,GPCode adb GPCNum,GPColSkip cmp #79 bgt 10$ adb GPCNum,GPColSkip cmp #79 blt 11$ 10$: ldb GPColSkip,#79 11$: sbb GPCNum,GPColSkip cpb GPCode,GPColSkip bne 12$ rts 12$: jmp ShowPage lumns displayed/row GPRCount: .block 1 ; first or second row GPRNum: .block 1 ; total rows di8X0 .ramsect ColorDirty: .block 1 ; whether we need to erase ; for the geopaint viewer BoxSave: .block 6 ; saving window dimensions GPCode: .block 1 ; uncompress code GPChr: .block 10 ; uncompress table GPCount: .block 1 ; to count down from 8 GPXPos: .block 2 ; R3 GPYPos: .block 1 ; R11L GPYCount: .block 1 ; current Y row GPCCount: .block 1 ; current X card GPCNum: .block 1 ; total columns displayed/row GPRCount: .block 1 ; first or second row GPRNum: .block 1 ; total rows displayed GPCBoxX: .block 2 ; color column # first byte GPCBoxY: .block 1 ; color row #, first byte GPCPtrT: .block 2 ; pointer into color ram GPCPtrR: .block 2 ; moving pointer into color GPCXDex: .block 1 ; num cols colored so far GPCYDex: .block 1 ; num rows colored so far GPCBDex: .block 1 ; number bytes = 80 GPColSkip: .block 2 ; number bytes to skip=0 ColSkipBt: .block 2 ; number bytes to skipow beq 40$ jmp GPBitLoop ; not a new record 40$: rts ,FileClkd ldb dblClickCount,#$40 rts db dblClickCS/gbwDAABPRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&o.b0P ;***************************** ;* ;*  geoBrowser ;* ;* (C) 2000 Bo Zimmerman  ;* 0P;* Intro: ;* Handles the about box, ;* and running das .noeqin 0P ;*****************************  .include GEOSequates 0P.glbl .eqin type, bit 7 S .byte APPLICATION ;Geos file type .byte SEQUENTIAL ;Geos file structure type .word ProgStart ;load address of program .word $0P0 DAABrun2: jsr UnColor lda DAABdrv jsr SetDevice plw R6 ldx $0001 ldb $0001,#$35 phb $d017 ldb $d017,#0 stx $0001 ldb R0L,#0 lda #%00000000 sta R10L jsr GetFile ldx $0001 ldb $0001,#$35 plb $d017 stx $0001 mvb screencolors,R2L ldw R1,#$8c00 ldw R0,#(25*40) jsr FillRam ldb R2L,#15 ldb R2H,#199 ldw R3,#0 ldw R4,#319 jsr RecoverRectangle DAABrun3: jmp DARefrsh Refrsh rsh r: Symbol defined more than once In module: 0 In file: S/gbwDAAB.rel #](#C0P0 DAABnada: rts 0P0 DAABMenu: .byte 15 .byte 15+1+(1*14) .word 0 .word 79 .byte VERTICAL | 1 .word DAABtext .byte MENU_ACTION .word DAABabout .word DAABaces .byte MENU_ACTION .word DAAB0P0 AbtBox: jsr ClrScrn AbtBox2: jsr UnColor cwi rightMargin,#320 ble 10$ ldb AbtDat+4,#$80 ldb AbtDat+6,#$81 10$: lda #[(AbtDat) sta $02 ; set lsb for dialog data lda #](AbtDat) sta $03 ; set msb for dialog data jmp $c256 ; call DoAbtBox and leave! AbtDat: .byte $01 ; size flag, and shadow pattern .byte $20,$b5,$40,$00,$1e,$01 ; dialog box dimensions .byte $0b,$06,$0b ; static text .word AbtT00 .byte $0b,$06,$17 ; static text .word AbtT01 .byte $0b,$06,$21 ; static text .word AbtT02 .byte $0b,$07,$2a ; static text .word AbtT03 .byte $0b,$07,$35 ; static text .word AbtT04 .byte $0b,$07,$47 ; static text .word AbtT05 .byte $0b,$07,$52 ; static text .word AbtT06 .byte $0b,$07,$5d ; static text .word AbtT07 .byte $0b,$08,$6d ; static text .word AbtT08 .byte $0b,$08,$77 ; static text .word AbtT09 .byte $0b,$08,$81 ; static text .word AbtT0a .byte $01,$12,$7e ; OK button .byte $00 ; end of table AbtT00: .byte $1a,$18," geoBrowser v1.6",27,0 AbtT01: .byte "This program is SHAREWARE. Distribute it",27,0 AbtT02: .byte "as you like. If you enjoy it, send your",27,0 AbtT03: .byte "registration fee of $15 USD to the",27,0 AbtT04: .byte "following address:",27,0 AbtT05: .byte "Bo Zimmerman",27,0 AbtT06: .byte "1907 Cameo Drive",27,0 AbtT07: .byte "Round Rock, TX 78664",27,0 AbtT08: .byte "Registering this program will entitle you",27,0 AbtT09: .byte "to notification of updates, and encourage",27,0 AbtT0a: .byte "future development.",27,0 0P0 .ramsect DAABdrv: .block 1 DAABaces: .block 148 TheEnd: .block 1tDat+4,#$80 ldb AbtDat+6,#$81 10$: lda #[(AbtDat) sta $02 ; set lsb for dialog data lda #](AbtDat) sta $03 ; set msb for dialog data jmp $c256 ; call DogeoBrowserDocs(PRG formatted GEOS file V1.0? '$ $$$$4$$$4$$$$$$<Write Image V2.0Red StormgeoWrite V1.1 This file was created with Wrong is Write. Written by Joe Buckley.  0@00000 geoBrowser v1.6  (c) 2000 by Bo Zimmerman 0@00000 This program is shareware. If you find the program useful, please register it. It will encourage me to continue developing this software. Registration instructions can be seen by executing the program. Please send any and all reports of praise or problems to bo@zimmers.net, or to the address shown on the registration screen. Only registered users will receive bug fixes and new feature enhancements.  @Introduction:  geoBrowser is a GEOS v2.0 application which allows you to view many different kinds of text and picture documents without loading their respective applications and without having to translate them into another file type. geoBrowser's resizable, movable window system supports the browsing and viewing of standard Commodore text files in SEQ format (or PRG format), standard ASCII text files in SEQ or PRG format, geoWrite v2.0 and v2.1 documents with support for fonts and clip-art, geoPaint files in full color, LoadStar packed text files, GEOS Text Albums, GEOS Photo Albums, Applications, Desk Accessories, CMD Native partition subdirectories, and GEOS Notepad "Notes" files. Using the geoBrowser interface: geoBrowser is executed by double-clicking on its icon from the deskTop. When the main screen comes up, you will see two drop-down menus at the top of the screen, and two windows, one of which is empty. The two main menu options include the geos menu, which contains a "program info" option for viewing application version information, and options for any desk accessories you might have on the disk from which you launched geoBrowser. The other menu option is the file menu, which contains an "open" option, for viewing a file selected from the file window (see below), and an "exit" option, which exits from geoBrowser and re-loads the deskTop. Directly below the menu is the File window and to the right of the file window is the larger Browse window. First we will experiment on using the windows as described below and then we will move on to the differences between the two. Each window is divided into several parts. The top part of each window, a horizontal bar containing many horizontal lines, is the Title bar. On the right side of each title bar is a square box which is the Close button. Stretching vertically along the right side of each window is the Page bar with two page arrow buttons. Stretching horizontally along the bottom is the Command bar which may contain some buttons. The small box in the bottom right of the window, where the Page bar and the Command bar intersect, is the Resizing widget. The rest of the window is the viewing area. In order to use a particular window, the user must first activate that window. When geoBrowser first loads, the File window is the active window. A window is activated by clicking anywhere inside the window. Once activated, any of the functions and buttons in that window may be used. Activating a window will automatically de-activate the other window. Since the two windows may overlap each other at times, the active window will always be the one on top and in the foreground. 0@00000 0@00000 An activated window may be moved around on the screen using your mouse or other GEOS pointing device. A window is moved by holding down the mouse button inside of the active window's title bar and moving the mouse. The user will notice the window partially redraws itself as the mouse is moved. When the window is at the desired place on the screen, simply release the mouse button. The window will then completely redraw and stay put. Be careful not to try and move a window on top of the menu at the top of the screen. 0@00000 0@00000 An activated window may be made bigger or smaller using the  resizing widget, which is the square on the bottom right corner of each window. To resize a window, hold down the mouse button inside of the resizing widget and begin moving the mouse. You will notice the window partially redrawing itself to the new size you are setting for it. When the window is the size and shape you desire, release the mouse button and the window will complete its redrawing. Using the File window: The left-most window when geoBrowser first loads is the File window. This window contains a complete list of all the files found on the active disk drive. When more files are on the disk than will fit in the window, you may use the bottom Page arrow button to go to the next page of file names. The top "up" Page arrow button will go back to a previous page of file names. If the first filename in the window is a ".." file, this means that you are in a CMD Native partition and may double click this file to return to a previous subdirectory. The file window also contains either one or two buttons inside its bottom Command bar. One button is the "Drive" button. If you have more than one drive hooked up, this button will open up a disk in the next drive from A to B to C to D and back to A. If you have opened a drive other than the one you booted geoBrowser off of, you will also see a "Disk" button. This button will prompt you to insert a new disk into the current drive and then allow you to browse the files on that disk. The files listed may be opened for browsing in one of two ways. The first way is to select a file by clicking once on its name. This will highlight the filename. From here, you can select the File menu and click on the "open" option. This will open the file for browsing. The second way to open a file is to quickly double-click on the name of the file. The file window's Close button will simply de-activate the file window and activate the browse window. Using the Browse window: The larger window is the browse window, and it is where the text and graphics of the opened file may be viewed. When a file is opened from the File window, its name will appear in the title bar of the browse window. When this title bar does not contain a file name, then no file is opened. The type of file will be auto-detected by geoBrowser, so you need not tell geoBrowser whether the file is ASCII or PETSKII or LoadStar packed, etc. The text in the browse window may be scrolled through by using the Page arrow keys. Also, the text in a document will be automatically word wrapped for you. If the text contains carriage returns of its own, it may look strange. Resizing the browse window may help you out on this. geoWrite documents contain Fonts, different text styles, tabs, and clip-art. geoBrowser supports all of these, bu0@00000 geoWrite documents contain Fonts, different text styles, tabs, and clip-art. geoBrowser supports all of these, but may handle them differently than you expect. Fonts are supported so long as the font is not too large to fit in geoBrowser's font buffer. Also, when a change in a text style (outline, bold, italics, etc) results in a font being taller than it was before, or if a font change mid-sentence results in a larger font being displayed, the newly styled word will be moved down slightly in the window to accomodate the line above it. Tabs will work exactly as they do in geoWrite, except that tabs which are beyond the scope of the browse window (roughly beyond the 6th inch), may be wrapped to the next line. Clip-Art is also supported, and geoBrowser will do its best to fit as much of the picture in its window as possible. However, sometimes geoBrowser will reserve a whole page for a picture when it can't quite fit enough of it on the current page. In these cases, just hit the down page arrow to see the whole picture. LoadStar packed files are prefixed with a "p." in the file name and are typically in PRG format. This format changes from time to time without notice, so you should look for updates to geoBrowser whenever one of these files is unreadable. You may also want to keep older geoBrowser's to read packed files in older formats. Text Albums and Photo Albums are supported, but the names of each of the scraps will not be shown from geoBrowser. Each "page" in the browse window will represent a record in the album. Photo scraps fall under the same restrictions as they do in geoWrite files; geoBrowser will try to show as much of the picture as will fit, though you may have to resize the browse window to see more of a larger picture. geoPaint files can be displayed in full color while GEOS is in 40 column mode. They are displayed in black and white while GEOS is in 80 column mode, unless Wheels 128 is being used. For Wheels 128 users in 80 column mode, geoPaint files will also appear in full color. While viewing a geoPaint file, a second pair of arrows will appear on the bottom of the browse window. These arrows allow the image to be moved horizontally within the browse window. The up and down arrows can be used to move the picture vertically. geoBrowser will also open desk accessories and applications. If you run an application, however, you will not be able to return to geoBrowser. geoBrowser is not a deskTop replacement, and provides application-launching only for convenience. The browse window's Close button will close any file you have opened and re-activate the file window.