[ 53280,0:53281,0:646,(162):"":" USE LYNX TO DISSOLVE THIS FILE":10 2 *LYNX XV BY WILL CORLEY 6 S/GEOLS2.CVT 135 S 163 S/GEOLS2RRC.CVT 125 S 90 S/GEOLS2TXT.CVT 49 S 90 H/GEOLS2.CVT 9 S 70 GEOLS2.LNK.CVT 5 S 97 LS-PRESENT2..CVT 34 S 34 S/geoLS2c"PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&"HjJ87*2-0iGZZ0h ;********************************* ;*  @LoadStar Presenter! - rev. 2 (1.7) ;* By Bo Zimmerman ;* Completed January , 1997 ;* Revised January, 1998 ;********************************* .if Pass1 .noeqin .noglbl .include GEOSequates .eqin .glbl .endif  ;  HTable of Contents (abbreviated) ; Variables - page 48 ; Code - page 2 - 30 ; LOADSTAR graphic - 31 ; (some) Table data, - S/geoLStxt ; (all but one of the) icons - S/geoLStxt ; packed data translation - S/geoLStxt  .psect - S/geoLStxt  .psect rd ProgStart ;load address of program .word $3ff ;end address, needed for ;desk accessories. .word ProgStart ;init address of program .byte "LS Presenter 1.7",0,0,0,$00 ;perm. filenam0h0 ;********************************* ;*  @ProgStart - inits the system and drops to the kernel ;*  @SaveRRegs - save the system registers ;* @ RstrRRegs - restore the system registers ;********************************* ProgStart: ldb dispBufferOn,#(ST_WR_FORE|ST_WR_BACK) jsr InitDA ; read in DA files jsr LdPrntDrv jsr OpenUp ; init the main screen rts ; start program SaveRRegs: mvw R0,RegSave mvw R1,RegSave+2 ldw R0,#R1H ldw R1,#RegSave+3 ldy #21 10$: lda (R0),y sta (R1),y ylp 10$ jmp RstrRRegs RstrRRegs: ldw R0,#RegSave+3 ldw R1,#R1H ldy #21 10$: lda (R0),y sta (R1),y ylp 10$ mvw RegSave,R0 mvw RegSave+2,R1 rts *q0h0 ;********************************* 0h0 ;********************************* ;*  @OpenUp - gets the loadstar disk from ;* user, handles opening boxes, and ;* drive/disk selection for loadstar ;*********************************  OpenUp: cbi numDrives,#2 ; no Drive icon for 1 drive bge 10$ ldb Opnin2,#0 10$: ldb ClearScreen+1,#2 ; clear the screen ldw R0,#ClearScreen jsr GraphicsString ldw ClickF,#1 ; initialize click flag  jsr MkLilBox ; make little text box ReOpen: mvb curDrive,LSDrive ldb A2L,#18 ldw A1,#LSDrive+1 ; find loadstar disk name jsr MoveDrNm ldw R0,#200 ldw R1,#PData ; clear fname area jsr ClearRam ldw R10,#0 ldw R6,#PData ldb R7 L ,#NOT_GEOS ; get disk files ldb R7H,#10 jsr FindFTypes ldw A0,#PData ; make fnames printable 10$: ldy #0 lda (A0),y bne 11$ lda #32 ; put space in a blank fname sta (A0),y iny  lda #0 ; put space in a blank fname sta (A0),y  11$: avw #17,A0 0h0 cwi A0,#PData+(17*9) ; now were done bne 10$ ldw R0,#OpeninBox jsr DoDlgBox ; do dialog box cbi sysDBData,#2 bne 12$ jsr ClrLilBox ; quit clicked jmp DoQuit 12$: cmp #5 bne 13$ jsr ClrLilBox ; open click = chaaarge! jmp GitGoin 13$: cmp #6 bne 14$ jsr DoDisk ; disk click = switch disks jmp ReOpen 14$: jsr DoDrive ; drive click = move over jmp ReOpen escription box line .byte NEWPATTERN,0 .byte MOVEPENTO,0,0,188 .byte RECTANGLETO,63,1,197 .byte 0 mvb TheEnd,dispBufferOn rts 0h0 ;********************************* ;* drvcon - drive icon data  0h0;* ;*  @DoDrv - change drives ;*********************************  drvcon: .word drvmage ;graphic location .word 0 ;leave this at 0 .byte drvW ;width, set below .byte drvH ;height, set below .word DoDrv ;location of action routine drvmage: @ drvW =picW drvH =picH DoDrv: ldb sysDBData,#0 ; send drive click command jmp RstrFrmDialogue -w0h0h0 ;********************************* ;*  @DoDisk - change disks .. DiskBox - data ;*  @DoDrive - handle drive toggles ;*  @MkLilBox - make bottom intro box ;*  @ClrLilBox - erase the bottom intro box ;********************************* DoDisk: ldw R0,#DiskBox ; ask for new disk jsr DoDlgBox jsr OpenDisk jmp DFerrors ; handle any errors DiskBox: .byte $80 | $01 .byte 11,$0e,$12 .word CDtxt0 .byte $01,$0f,$42 .byte 0 DoDrive: ldx #$08 lda numDrives add #7 cmp curDrive ble 20$ ldx curDrive inx 20$: txa jsr SetDevice jsr OpenDisk cpx #0 bne DoDrive rts MkLilBox: jsr i_GraphicsString .byte NEWPATTERN,0 .byte MOVEPENTO,90,0,145 .byte FRAME_RECTO,235,0,185 .byte MOVEPENTO,91,0,146 .byte RECTANGLETO,234,0,184 .byte ESC_PUTSTRING,102,0,167 .byte $18,"- LoadStar Presenter -",27,0 rts ClrLilBox: jsr i_GraphicsString .byte NEWPATTERN,2 .byte MOVEPENTO,90,0,145 .byte RECTANGLETO,235,0,185 .byte 0 rts PUTSTRING,102,0,167 .0h0 ;********************************* ;*  @InitDA - reads in the DAs from the boot ;* drive and builds the GEOS submenu therefrom ;*  @MoveDrNm - copies current drives name ;*********************************  InitDA: mvb curDrive,DADrive ldb A2L,#18 ldw A1,#DADrive+1 ; copy DA drive info jsr MoveDrNm ldw R6,#DAText ldb R7L,#DESK_ACC ldb R7H,#7 ldw R10,#10 jsr FindFTypes ; look for DAs, file them lda #7 sub R7H beq 10$ clc adc #1 pha ora #VERTICAL ; add to geos submenu sta GMenu+6 pla sta R0L asl a asl a asl a asl a sub R0L sub R0L clc adc #16 sta GMenu+1 10$: rts MoveDrNm: ldx #A0 ;discover the current drives jsr GetPtrCurDkNm ;name. Should this be a routine? ldy #$00 17$: lda (A0),y ;copy Disk Name to Buffer... cmp #$a0 ;so that a 0 can be added beq 18$ ;and thus be readable by sta (A1),y ;the dialog box routines iny cmp #$a0 beq 18$ cpy A2L bne 17$ 18$: lda #0 ;now add EOL to end sta (A1),y rts  |0h0h0 ;********************************* ;*  @LdPrntDrv -  load print driver and set ;* or clear the print flag ;*  @SwapDrv -  swap in/out printer driver ;********************************* LdPrntDrv: ldw R0L,#1 ldw R6,#$8465 ldw R7,#PrtDrvBuf jsr GetFile ; read print driver cpx #0 beq 10$ ldb PrtDrv,#0 ; print driver not found rts 10$: ldb PrtDrv,#1 ; print driver loaded rts SwapDrv: ldw R0,#PrtDrvBuf ldw R1,#$7900 ; re-load printer driver 10$: ldy #0 lda (R0),y tax lda (R1),y sta (R0),y txa sta (R1),y avw #1,R0 avw #1,R1 cwi R1,#$7f3f bne 10$ rts j0h0 ;********************************* ;* GMenu - geos menu data ;* ;* ;********************************* GMenu: ;Th0h0 ;********************************* ;* GMenu - geos menu data ;* ;* ;********************************* GMenu: ;The sub menu under the "geos" thang .byte 15 ;top scanline .byte 15+1+(1*14) ;bottom scanline,15+1+(#items*14) .word 0 ;left x position .word 79 ;right x position .byte VERTICAL|1 ;# of items (if no DA's) .word GStxt0 ;text for this item .byte MENU_ACTION .word R_DoAbout .word DAText .byte MENU_ACTION .word R_RunDA .word DAText+$11 .byte MENU_ACTION .word R_RunDA .word DAText+$22 .byte MENU_ACTION .word R_RunDA .word DAText+$33 .byte MENU_ACTION .word R_RunDA .word DAText+$44 .byte MENU_ACTION .word R_RunDA .word DAText+$55 .byte MENU_ACTION .word R_RunDA .word DAText+$66 .byte MENU_ACTION .word R_RunDA .word DAText+$77 .byte MENU_ACTION .word R_RunDA ^m0h0 ;********************************* ;*  @R_DoAbout - show the prog info box ;* Ab_Box - prog info box data ;* ;******************************0h0 ;********************************* ;*  @R_DoAbout - show the prog info box ;* Ab_Box - prog info box data ;* ;********************************* R_DoAbout: jsr GotoFirstMenu ;roll up menu ldw R0,#Ab_Box jsr DoDlgBox rts Ab_Box : .byte $80 | $01 (P0 .byte 11 ;add text .byte $2e,$14 .word ABtxt0 .byte 11 ;add text .byte $3f,$28 .word ABtxt1 .byte 11 ;add text .byte $16,$3f .word ABtxt2 .byte 11 ;add text .byte $12,$52 .word ABtxt3 .byte 14 ;Quit on Click .byte 0 ;end of defintion  R_DoNothing: jsr GotoFirstMenu ;Nothing Done! rts R_RunDA: pha jsr GotoFirstMenu pla jsr RunDA rts .word DAText+$55 .byte MENU_ACTION .word R_RunDA .word DAText+$66 .byte MENU_A0h0 ;********************************* ;*  @RunDA - executes and cleans up after ;* a desk accessory run. ;* ;********************************* RunDA: sta R6L ;calculate filename of DA asl a asl a asl a asl a add R6L clc adc #[(DAText-17) sta R6L lda #0 adc #](DAText-17) ; get filename sta R6H phw R6 ldw A3,#DADrive jsr DoDrvM ; correct drive? beq 01$ plw R6 rts 01$: plw R6 ldx $0001 ldb $0001,#$35 phb $d017 ldb $d017,#0 stx $0001 ldb R0L,#0 ;standard loading option lda #%0000000 ;tell DA what to save sta R10L jsr GetFile stx R6L ldx $0001 ldb $0001,#$35 plb $d017 stx $0001 jsr ColorUp ; restore screen color ldb R2L,#15 ldb R2H,#199 ldw R3,#0 ldw R4,#319 jsr RecoverRectangle ldw A3,#LSDrive ; go back to LS drive jsr DoDrvM rts s .word R_RunDA beq 18$ ;and thus be readable by sta (A1),y ;the dialog box routines iny cmp #$a0 beq 18$ cpy A2L bne 17$ 18$: lda #0 ;now add EOL to end sta (A1),y rts  te RECTANGLE0h0 ;********************************* ;*  @DoDrvM - ensure current disk is right disk ;* RightDisk - data for right disk box prompter ;* CanBox, OkBox - data for cancel, ok boxes ;********************************* DoDrvM: ;make sure correct disk for Drive A3L is in. ldy #$00 ;met current drive proper lda (A3),y jsr SetDevice mvw A3,A4 ;copy filename ptr to A4 avw #$01,A4 ;make sure filename is pointed ldw A1,#DiskNm ;DiskNm is dest for disk name ldb A2L,#18 ;18 chars max jsr MoveDrNm ldx #A4 ;now compare A4 to A1 ldy #A1 jsr CmpString beq 39$ ldw R0,#RightDisk ;not equal, so send box ldw A2,#Temp jsr DriveLetter ;find drive letter jsr DoDlgBox jsr OpenDisk ;re-open the drive lda sysDBData cmp #$02 ;if cancelled then cancel! bne DoDrvM lda #$ff ;send error rts 39$: lda #$00 ;successfull and done rts RightDisk : .byte $80 | $01 .byte $01,$04,$46 ;OK icon .byte $02,$0e,$46 ;Cancel icon .byte 11 ;add text .byte $1b,$11 .word DMtxt0 .byte 12 ;add text .byte $1a,$21 .byte A4 .byte 11 ;add text .byte $1b,$35 .word DMtxt1 .byte 12 ;add text .byte $5a,$35 .byte A2 .byte 0 ;end of defintion CanBox: .byte $80 | $01 .byte 12,$20,$1b,A5 .byte $02,$0f,$40 .byte 0 OKBox: .byte $80 | $01 .byte 12,$20,$1b,A5 .byte $01,$0f,$40 .byte 0 y0h0 ;********************************* ;*  @DFerrors - take an disk error in .x and ;* display appropriate message. ;* ;*********************************  DFer0h0 ;********************************* ;*  @DFerrors - take an disk error in .x and ;* display appropriate message. ;* ;*********************************  DFerrors: stx A4L ;save error code cpx #$00 ;was there an error? beq 99$ ;if not, exit ldy #$00 97$: lda ERcht,y ;check chart for valid errors cmp A4L bne 98$ lda ERcht+1,y ;now find address of error sta A5L ; text string lda ERcht+2,y sta A5H bra 54$ 98$: iny ;increment error chart counter iny ; for another run iny cpy #$15 ;seven total valid errors bne 97$ ldw A5,#ERtxt8 ;no valid error, so use Disk Error ldw R0,#CanBox 54$: jsr DoDlgBox ;now open error window lda #$ff ;send back error code rts 99$: lda #$00 ;send back no error rts ERcht: .byte 3 ;error codes, and pointer to .word ERtxt1 ;their descriptors. .byte 5 .word ERtxt2 ;if adding a code, remember .byte 11 ;to set counter as there is .word ERtxt3 ;no table delimeter .byte 13 .word ERtxt4 .byte 31 .word ERtxt5 .byte 32 .word ERtxt6 .byte 39 .word ERtxt7 |0h0 ;********************************* ;*  @DriveLetter - calculate and return A,B,C from ;* a given drive name. ;*  @CmpA5A6 - compare two strings ;********************0h0 ;********************************* ;*  @DriveLetter - calculate and return A,B,C from ;* a given drive name. ;*  @CmpA5A6 - compare two strings ;*********************************  DriveLetter: ldb Temp,#'A' ;assume it's A ldb Temp+1,#$00 ldx #A5 jsr GetPtrCurDkNm ;get Drive Name ldw A6,#DrACurDkNm jsr CmpA5A6 beq 34$ ldw A6,#DrBCurDkNm ; compare them to others jsr CmpA5A6 beq 33$ ldw A6,#DrCCurDkNm jsr CmpA5A6 bne 34$ ldb Temp,#'C' bra 34$ 33$: ldb Temp,#'B' ;was B 34$: rts CmpA5A6: ldy #18 33$: dey ;compare names beq 34$ lda (A5),y cmp (A6),y beq 33$ 34$: rts  UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU0h0 ;********************************* ;*  @GitGoin - read in features button data ;* Put those buttons on the screen. ;* ;********************************* GitGoin: ldw R6,Features ; find "features" ldb $886e,#$ff jsr FindFile cpx #0 beq 10$ ; is this really the disk? ldw A5,#NLtxt0 ldw R0,#CanBox jsr DoDlgBox ; nope, so leave... jmp OpenUp 10$: ldw R0,#5040 ldw R1,#Pdex ; clear all entries jsr ClearRam ldw A5,#PData ; set up read pointers mvw $8401,R1 ldw R5,#0 11$: ldw R4,#BlkBuf jsr ReadByte ldy #0 sta (A5),y ; read all table data! avw #1,A5 cpx #0 beq 11$ jsr ParseL ; parse read data jsr ScreenUp ; make main screen rts k0h0 ;*********************************0h0 ;********************************* ;*  @ScreenUp - bring up main screen, save ;* color scheme, display graphics, set up ;* buttons, and set up menu. ;********************************* ScreenUp: ldb ClearScreen+1,#0 ldw R0,#ClearScreen ; clear screen jsr GraphicsString jsr InitForIO mvb 53287,Colors mvb 53280,Colors+1 ; save screen colors mvb 53281,Colors+2 jsr DoneWithIO jsr ColorUp ; bring up new colors jsr i_BitmapUp .word LOADSTAR .byte 9 .byte 0 .byte LSx ; show LS graphic at top .byte LSy ldw R0,#MMenu lda #0 jsr DoMenu ; set up main menu jsr ButtsUp ; put up main buttons jsr LineUp ; show desc. line jsr ClrLine ; clear text in desc line ldw otherPressVec,#Clicks1 rts o0h0h0 ;********************************* ;*  @ColorUp - color the main screen, the ;* main buttons, the graphic. ;*  @UnColor - remove color scheme ;********************************* ColorUp: jsr InitForIO ldb 53280,#1 sta 53281 ; make black border sta 53287 jsr DoneWithIO ldb R2L,#(7*16)+0 ldw R1,#COLOR_MATRIX ldw R0,#(25*40) ; make yellow/black bckgrd jsr FillRam ldw A0,#COLOR_MATRIX+8 ldy #25 10$: lda #(1*16)+0 ; do white line sta (A0),y ylp 10$ avw #40,A0 ldy #25 11$: lda #(3*16)+0 ; do cyan line sta (A0),y ylp 11$ avw #40,A0 ldy #25 12$: lda #(14*16)+0 ; do light blue line sta (A0),y ylp 12$ ldw A0,#COLOR_MATRIX+(22*40) ldy #80+39 13$: lda #(10*16)+0 ; do light red lines sta (A0),y ylp 13$ rts UnColor: mvb screencolors,R2L ; restore old GEOS colors ldw R1,#COLOR_MATRIX ldw R0,#(25*40) jsr FillRam jsr InitForIO mvb Colors,53287 ; restore background mvb Colors+1,53280 mvb Colors+2,53281 jsr DoneWithIO rts r0h0h0 ;***************** **************** 0h0;* MMenu - data for main menu ;* IMenu - data for issues submenu ;* ;***************** **************** 0h0  MM enu: .byte 0 ;top .byte 14 ;bottom .word 0 ;left .word 55 ;right .byte 2|HORIZONTAL ;# items, and menu type .word MMtxt0 ;Here be the text .byte VERTICAL ;type of sub menu .word GMenu ;Sub menu structure .word MMtxt1 .byte VERTICAL .word IMenu IMenu: .byte 15 ;top scanline .byte 15+1+(2*14) ;bottom scanline,15+1+(#items*14) .word 29 ;left x position .word 29+40 ;right x position .byte VERTICAL|2 ;# of items (if no DA's) .word IStxt0 ;text for this item .byte MENU_ACTION .word R_DoNext .word IStxt1 .byte MENU_ACTION .word R_DoQuit Et0h0 ;********************************* ;* @ R_DoNext - load another issue ;*  @R_DoQuit - exit from presenter ;* ;********************************* R_DoNext: jsr0h0 ;********************************* ;* @ R_DoNext - load another issue ;*  @R_DoQuit - exit from presenter ;* ;********************************* R_DoNext: jsr GotoFirstMenu jsr UnColor ; restore disk selection jmp OpenUp R_DoQuit: jsr GotoFirstMenu DoQuit: jsr UnColor ldw A3,#DADrive ; find boot drive and leave jsr DoDrvM jmp EnterDeskTop v0h0 ;********************************* ;*  @ParseL -  parse the features data into0h0 ;********************************* ;*  @ParseL -  parse the features data into ;* primary selections for the main set of ;* buttons on the left. ;********************************* ParseL: ldw A0,#PData+6 ldw A1,#Pdex ; initialize pointers 10$: ldy #0 lda A0L sta (A1),y iny ; move L name into Pdex lda A0H sta (A1),y ldx #0 11$: ldy #0 ; check a char lda (A0),y beq 14$ ; zero = end cmp #13 bne 12$ ; CR = delimeter inx ; count them cpx #3 bne 13$ ; next fname avw #2,A1 ; next Pdex entry avw #1,A0 ; point to name bra 10$ ; add it and continue 12$: ldx #0 ; no CR entry 13$: avw #1,A0 bra 11$ 14$: rts ; all done z0h0 ;********************************* ;*  @ParseLL - 0h0 ;********************************* ;*  @ParseLL -  parse the features data into ;* sub-section data components with which ;* to build the next menu ;********************************* ParseLL: ;* receive Temp w/ index into Pdex/2 ldw R0,#60 ; clear out area ldw R1,#Ldex jsr ClearRam asl Temp ldb Temp+1,#0 ldw A2,#Pdex ; set up first file adw Temp,A2 ldy #0 lda (A2),y ; now get address sta A0L iny lda (A2),y sta A0H mvw A0,A4 ldw A1,#Ldex ; initialize destination pointer ldx #0 10$: ldy #0 ; get started checking chars! lda (A0),y bne 11$ rts ; abnormal end 11$: cmp #13 bne 13$ inx cpx #2 ; count yer CRs, count 'em bne 14$ ; 1 by 1 .... avw #1,A0 ldy #0 lda (A0),y ; will there be 3? cmp #13 bne 12$ rts ; a happy exit 12$: lda (A0),y beq 15$ ; bad filename, done lda A0L sta (A1),y iny lda A0H ; found one, xfer pointer sta (A1),y avw #2,A1 bra 14$ 13$: ldx #0 14$: avw #1,A0 ; increment counter bra 10$ 15$: rts |0h0h0 ;********************************* ;*  @ParseC - parse from submenu selection ;* in Pdata pointers to aspects pertaining ;* to a single file to build final action menu. ;********************************* ParseC: lda Temp ; index to clicked file asl a tax lda Ldex,x ; get first line of info sta R0L inx lda Ldex,x sta R0H jsr NxtTH ; find next CR mvw R0,A5 jsr NxtTH mvw R0,A6 ; save other flags jsr NxtTH mvw R0,A7 jsr NxtTH mvw R0,A8 inc Temp rts UU0h0 ;********************************* ;*  @XString - display string, even packed ;*  @SPutChar - display char saving .x & .y ;*  @NextTH  - return ponter to next line of data ;********************************* XString: ldy #0 10$: lda (R0),y beq 12$ ; abnormal ending? tax lda Trans1,x bne 11$ ; straight trans case lda Trans2,x jsr SPutChar bra 16$ 11$: cmp #13 bne 13$ lda #27 ; clear end of every line jsr SPutChar 12$: rts ; got a CR, all done 13$: cmp #$ff bne 15$ cpx #12 bge 12$ ; too many spaces error 14$: lda #32 jsr SPutChar dex ; handle spaces code bne 14$ bra 16$ 15$: jsr SPutChar lda Trans2,x ; dual character case jsr SPutChar 16$: iny ; continue. will this work? bne 10$ rts ; overflow exit SPutChar: stx A9L sty A9H jsr PutChar ; save x and y putchar ldx A9L ldy A9H rts NxtTH: ldy #0 lda (R0),y beq 14$ ; zero is exit too cmp #13 beq 14$ ; found by CR avw #1,R0 ; increment pointer jmp NxtTH 14$: avw #1,R0 rts 0h0 ;********************************* ;*  @ButtsUp - display main screen buttons, init ;*  @ScnUp2 - draw a particular button ;* LineUp, ClrLine - the comment line at bottom ;********************************* ButtsUp: ldw A0,#Pdex ldb SUtab+9,#28 ScnUp2: mvb SUtab+9,SUtab+5 ; top of box mvb SUtab+5,SUtab+21 inc SUtab+21 avb #11,SUtab+9 ; bottom of box mvb SUtab+9,SUtab+13 inc SUtab+13 mvb SUtab+13,SUtab+17 mvb SUtab+13,SUtab+25 jsr i_GraphicsString ; draw buttons defined above SUtab: .byte NEWPATTERN,1 .byte MOVEPENTO,15,0,0 .byte FRAME_RECTO,15+100,0,0 .byte MOVEPENTO,15+2,0,0 .byte LINETO,16+100,0,0 .byte MOVEPENTO,16+100,0,0 .byte LINETO,16+100,0,0 .byte 0 lda SUtab+9 sec sbc #3 sta R1H ; fix bottom of text title ldw R11,#20 ldy #0 lda (A0),y ; get pointer to text sta R0L iny lda (A0),y sta R0H jsr XString ; put text in box avw #2,A0 avb #5,SUtab+9 ; set up for next box ldy #1 lda (A0),y beq 10$ ; is there a next? jmp ScnUp2 10$: rts LineUp: jsr i_GraphicsString ; draw description box line .byte NEWPATTERN,1 ; at the bottom .byte MOVEPENTO,0,0,187 .byte LINETO,63,1,187 .byte MOVEPENTO,0,0,198 .byte LINETO,63,1,198 .byte 0 rts ClrLine: mvb dispBufferOn,TheEnd ldb dispBufferOn,(ST_WR_FORE | ST_WR_BACK) jsr i_GraphicsString ; clear description box line .byte NEWPATTERN,0 .byte MOVEPENTO,0,0,188 .byte RECTANGLETO,63,1,197 .byte 0  mvb TheEnd,dispBufferOn  rts s0h0 ;***0h0 ;********************************* ;*  @Clicks1  - handle clicks on one of the ;* main buttons. if one is clicked, call the ;* routine to build the subfeatures menu ;********************************* Clicks1: lda ClickF beq 10$ ; fixes the click-off "feature" ldb ClickF,#0 rts 10$: inc ClickF ldb R2L,#28 ldb R2H,#185 ldw R3,#15 ; is it in click region? ldw R4,#115 ldb Temp,#0 jsr IsMseInRegion cmp #$ff beq 11$ rts 11$: mvb R2L,R2H avb #11,R2H jsr IsMseInRegion ; is in this box? cmp #$ff beq 12$ lda Temp asl a ; look for next box? tax inx lda Pdex,x bne 13$ rts ; no more to check 13$: inc Temp avb #16,R2L bra 11$ rts 12$: jsr SaveRRegs  jsr InvertRectangle ; clicked in a square! 0h0 jsr ParseLL ; parse file data jsr MkListBox lda #$18 jsr PutChar ; bold mvw A4,R0 jsr NxtTH ldb R1H,#195 ldw R11,#70 jsr XString ; show description lda #27 jsr PutChar ; normal text jsr RstrRRegs jsr InvertRectangle ; now do the click rts x0h0 ;********************************* ;*  @MkListBox  - set up the RHS files menu after ;* a main selection is made. Set up Clicks2 to ;* handle clicks in this menu. ;*********************0h0 ;********************************* ;*  @MkListBox  - set up the RHS files menu after ;* a main selection is made. Set up Clicks2 to ;* handle clicks in this menu. ;********************************* MkListBox: ldb Lnum,#0 ldb LsavT,#25 ; save window info ldw LsavL,#152 ldw LsavR,#270 ldw A0,#COLOR_MATRIX + 138 ldx #20 11$: ldy #17 12$: lda #( 13 * 16 ) + 0 sta (A0),y ; color stuff ylp 12$ avw #40,A0 dex bne 11$ ldw A0,#Ldex mvb LsavT,LsavB ScnUp3: mvb LsavB,LsavL+2 avb #11,LsavB inc Lnum ldb LsavR-1,#FRAME_RECTO ldw R0,#LUtab jsr GraphicsString lda #$18 ; set bold jsr PutChar lda LsavB sec sbc #3 sta R1H ; fix bottom of text title ldw R11,#160 ldy #0 lda (A0),y ; get pointer to text sta R0L iny lda (A0),y sta R0H jsr XString ; put text in box avw #2,A0 ldy #1 lda (A0),y beq 10$ ; is there a next? jmp ScnUp3 10$: lda #27 ; set up the boxness jsr PutChar ldw otherPressVec,#Clicks2 mvb LsavT,mouseTop mvb LsavB,mouseBottom mvw LsavL,mouseLeft ; save click windo info mvw LsavR,mouseRight jsr Lshadow ; make the shadow avw #5,LsavR avb #5,LsavB ldy #32 ldw R11,#165 sec jsr StartMouseMode ; move the mouse ldb faultData,#0 ; trap window moves ldw mouseFaultVec,#LClean rts |0h0 ;********************************* ;* @ Clicks2 - handle clicks inside a file RHS ;* menu. Call routines to set up the Run, Read, Copy ;* "little" menu. Pass click control to it. ;***************************0h0 ;********************************* ;* @ Clicks2 - handle clicks inside a file RHS ;* menu. Call routines to set up the Run, Read, Copy ;* "little" menu. Pass click control to it. ;********************************* Clicks2: lda ClickF beq 10$ ; fixes the click-off "feature" ldb ClickF,#0 rts 10$: inc ClickF ldb Temp,#0 mvb LsavT,R2L ; save window pointers mvw mouseLeft,R3 mvw mouseRight,R4 11$: mvb R2L,R2H avb #11,R2H jsr IsMseInRegion ; is in this box? cmp #$ff beq 12$ lda Temp ; find next box asl a tax inx lda Ldex,x bne 13$ rts ; no more to check 13$: inc Temp avb #11,R2L ; point to next box top bra 11$ rts 12$: jsr SaveRRegs  jsr InvertRectangle ; clicked in a square! 0h0 jsr ParseC ; parse data for this file jsr ClrLine mvw A5,R0 ldb R1H,#195 ldw R11,#70 lda #$18 jsr PutChar jsr XString ; display description for click lda #27 jsr PutChar jsr RstrRRegs jsr InvertRectangle ; do the actual click jsr MkGoBox ; make the little go box rts i0h0 ;********************************* ;* @ Clicks3  - handle clicks inside the "little" ;* menu (run, read, copy). On a valid click, ;* call the DoIt routine. ;************0h0 ;********************************* ;* @ Clicks3  - handle clicks inside the "little" ;* menu (run, read, copy). On a valid click, ;* call the DoIt routine. ;********************************* Clicks3: lda ClickF beq 10$ ; fixes the click-off "feature" ldb ClickF,#0 rts 10$: inc ClickF ldb Temp,#0 ldb R2L,#80 ; load window dimensions ldw R3,#130 ldw R4,#187 11$: mvb R2L,R2H avb #12,R2H jsr IsMseInRegion ; is in this box? cmp #$ff beq 12$ lda Temp cmp #2 bne 13$ rts ; no more to check 13$: inc Temp avb #12,R2L bra 11$ rts 12$: jsr InvertRectangle ; clicked in a square! jsr SaveRRegs ldw R0,#COLOR_MATRIX ldw R1,#ColorSave ; save background colors ldw R2,#1000 jsr MoveData ldy Temp inc Temp lda (A7),y cmp #'1' ; ensure the option exists beq 14$ ldb Temp,#0 14$: jsr RstrRRegs jsr InvertRectangle lda Temp ; do the click bne 15$ rts 15$: jmp DoIt ; perform the operation m0h0 ;*******************************0h0 ;********************************* ;*  @MkGoBox - draw the "little" run, read, copy ;* box, set up click control through Clicks3, ;* pass control to it. ;********************************* MkGoBox: ldb dispBufferOn,#(ST_WR_FORE) ldw A0,#COLOR_MATRIX + (10*40) + 15 ldx #5 10$: ldy #8 11$: lda #( 3 * 16 ) + 0 sta (A0),y ; color stuff ylp 11$ avw #40,A0 dex bne 10$ jsr DrGoBox ; draw the box lda #27 ; set up the boxness jsr PutChar ldw otherPressVec,#Clicks3 mvb mouseBottom,LsavB mvw mouseRight,LsavR ldb mouseTop,#80 ; load window dimensions ldb mouseBottom,#116 ldw mouseLeft,#130 ldw mouseRight,#187 ldy #100 ldw R11,#165 sec jsr StartMouseMode ; move the mouse ldb faultData,#0 ldw mouseFaultVec,#CClean rts ; pass move ctrl to CClean= zq0h0 ;********************************* ;* @ DrGoBox - data for drawing the "little" menu. ;* Put appropriate commands in box based on ;* data for file clicked on in Click0h0 ;********************************* ;* @ DrGoBox - data for drawing the "little" menu. ;* Put appropriate commands in box based on ;* data for file clicked on in Clicks2. ;********************************* DrGoBox: jsr i_GraphicsString .byte NEWPATTERN,1 .byte MOVEPENTO,130,0,80 .byte RECTANGLETO,187,0,116 .byte NEWPATTERN,0 .byte MOVEPENTO,131,0,81 .byte RECTANGLETO,186,0,91 .byte MOVEPENTO,131,0,93 ; draw the box .byte RECTANGLETO,186,0,103 .byte MOVEPENTO,131,0,105 .byte RECTANGLETO,186,0,115 .byte NEWPATTERN,1 .byte MOVEPENTO,188,0,81 .byte RECTANGLETO,190,0,118 .byte MOVEPENTO,132,0,117 .byte RECTANGLETO,190,0,118 .byte 0 RRP: ldb R1H,#89 ; first line ldw R11,#135 ldy #0 lda (A7),y ; get pointer to text cmp #'1' ; read it marked? bne 12$ ldw R0,#ROtxt0 ; read it! jsr PutString ldw R11,#135 12$: avw #12,R1H ldy #1 lda (A7),y cmp #'1' ; run it marked? bne 13$ ldw R0,#ROtxt1 ; run it! jsr PutString ldw R11,#135 13$: avw #12,R1H ldy #2 lda (A7),y cmp #'1' ; copy it marked/ bne 14$ ldw R0,#ROtxt2 ; copy it! jsr PutString 14$: rts u0h0 ;********************************* ;*  @CClean, C2Clean - clean up after the ;* "little" run, read, copy box 0h0 ;********************************* ;*  @CClean, C2Clean - clean up after the ;* "little" run, read, copy box and pass ;* control back to RHS menu & Clicks2 ;********************************* CClean: cpb mouseYPos,mouseTop beq 10$ ; did user move outside win? cpb mouseYPos,mouseBottom beq 10$ ; ** damn this cpw mouseXPos,mouseLeft beq 10$ cpw mouseXPos,mouseRight beq 10$ rts 10$: C2Clean: jsr ClrLine ; clear the description line ldw A0,#COLOR_MATRIX + (10*40) + 15 ldx #5 11$: ldy #8 12$: lda #( 13 * 16 ) + 0 sta (A0),y ; color stuff ylp 12$ avw #40,A0 dex bne 11$ ldb R2L,#80 ldb R2H,#118 ldw R3,#130 ; recover stuff behind menu ldw R4,#190 jsr RecoverRectangle ldb dispBufferOn,#(ST_WR_FORE | ST_WR_BACK) ldw otherPressVec,#Clicks2 mvb LsavT,mouseTop mvb LsavB,mouseBottom mvw LsavL,mouseLeft ; load old window dimentions mvw LsavR,mouseRight avb #5,LsavB avw #5,LsavR ldb faultData,#0 ; move mouse back ldw mouseFaultVec,#LClean lda #$18 jsr PutChar mvw A4,R0 jsr NxtTH ldb R1H,#195 ldw R11,#70 jsr XString ; display old description $ lda #27 jsr PutChar rts {0h0 ;********************************* ;*  @LClean - clean up after RHS menu, return ;* 0h0 ;********************************* ;*  @LClean - clean up after RHS menu, return ;* control to LHS buttons and Clicks1. ;*  @Lshadow - draw shadow for RHS menu ;********************************* LClean: cpb mouseYPos,mouseTop beq 10$ cpb mouseYPos,mouseBottom beq 10$ ; ** damn this too cpw mouseXPos,mouseLeft beq 10$ ; should be unnecessary cpw mouseXPos,mouseRight beq 10$ rts 10$: jsr ClrLine ; clear the description line ldw A0,#COLOR_MATRIX + 135 ldx #20 11$: ldy #20 12$: lda #( 7 * 16 ) + 0 ; 0*16 + 15 sta (A0),y ylp 12$ ; fix colors avw #40,A0 dex bne 11$ mvb LsavT, LsavL+2 ldb LsavR-1,#RECTANGLETO ldw R0,#LUtab jsr GraphicsString ldb mouseTop,#0 ldb mouseBottom,#199 ldw mouseLeft,#0 ; restore window ldw mouseRight,#319 ldw mouseFaultVec,#0 ; restore vectors ldw otherPressVec,#Clicks1 rts LUtab: .byte NEWPATTERN,0,MOVEPENTO LsavL: .word 152 .byte 0,FRAME_RECTO LsavR: .word 270 LsavB: .byte 0,0 Lshadow: mvw LsavR,SHtab+3 ; set up/dn shadow mvw LsavR,SHtab+7 avw #5,SHtab+7 mvb LsavT,SHtab+5 avb #5,SHtab+5 mvb LsavB,SHtab+9 avb #5,SHtab+9 ; done w up/dn shadow mvw LsavL,SHtab+11 ; start left-right shadow avw #5,SHtab+11 mvw LsavR,SHtab+15 avw #5,SHtab+15 mvb LsavB,SHtab+13 mvb LsavB,SHtab+17 avb #5,SHtab+17 jsr i_GraphicsString SHtab: .byte NEWPATTERN,1 ; 1 .byte MOVEPENTO,0,0,0 ; 3-4,5 .byte RECTANGLETO,0,0,0 ; 7-8,9 .byte MOVEPENTO,0,0,0 ; 11-12,13 .byte RECTANGLETO,0,0,0 ; 15-16,17 .byte 0 rts 1|0h0 LOADSTAR: C LSx = picW LSy = picHdb R1H,#195 ldw R11,#70 lda #$18 jsr PutChar jsr XString ; display description for click lda #27 jsr PutChar jsr RstrRRegs jsr InvertRectangle ; do the actual click UUUUUٞٳٳ?03 A1h s???~>???~>?~?x~~ s???~>???~>?~?x~~~>~>?~>~>~>p~ >p?~>?0~`?~>0?0x`~> 0?0`~>0`> ~>8~ > ??/\Bhٞٳٞٳٳ?03 C2j??|?~?|<????>  ?|<??|?~?|<????>  ?|<?|<|8|0|0@| `|``?|@``<?|` |A|p A| ?AB @MkGoBox - draw the "little" run, read, copy ;* box, set up click control through CliS/geoLS2rrcc|PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&:19U6zD;&/[iZ0h ;********************************* ;*  @LoadStar Presenter! rev.2 (1.7) ;* Read It, Run It, Copy It routines ;* By Bo Zimmerman ;* Completed January , 1997 ;* Revised January, 1998 ;********************************* .if Pass1 .noeqin .noglbl .include GEOSequates .eqin .glbl .endif  ;  HTable of Contents (abbreviated) ; Run It - 6 ; Read It - 7 ; Copy It ; Variables in free ram 18  .psect am 18  .psect ect (abbreviated) ; Run It - 6 0h0 ;********************************* ;* @ DoIt - handle one of the Read, Run, ;* Copy clicks. Pass control to routines. ;*  @RstrColor - restore normal background. ;********************************* DoIt: mvw mouseTop,BackB mvw mouseRight,BackR mvw mouseLeft,BackL lda Temp ; save window dimensions cmp #1 bne 10$ jmp DoReadIt ; read it 10$: cmp #2 bne 11$ jmp DoRunIt ; run it 11$: jmp DoCopyIt ; copy it RstrColor: ldw R1,#COLOR_MATRIX ldw R0,#ColorSave ; save background colors ldw R2,#1000 jmp MoveData w R2,#1000 jmp MoveData w R2,#1000 jmp MoveData 0h0 ;********************************* ;*  @WrongDisk - prompt for correct LS disk. ;*  @LilBBox - Display a click box over the ;* official colors, restore afterwards. ;********************************* LilBBox: ldw A0,#COLOR_MATRIX + 167 ldy #24 10$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 10$ ; fix first line avw #40,A0 ldx #11 11$: ldy #25 12$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 12$ ; fix colors avw #40,A0 dex bne 11$ avw #1,A0 ldy #24 13$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 13$ ; fix last line jmp DoDlgBox WrongBox:  .byte $80 | $01 .byte $01,$03,$41 ;OK icon .byte $02,$0f,$41 ;Cancel icon .byte 11 ;add text .byte $12,$12 .word WRtxt0 .byte 11 ;add text .byte $12,$22 .word WRtxt1 .byte 0 ;end of defintion WrongDisk: ; *** prompt for right disk  ldy #0 lda (A8),y sta WRtxt0 + 29 mvw A5,Temp2 ; save these registers mvw A6,Temp2 + 2 jsr DriveLetter ; find drive letter needed mvw Temp2,A5 mvw Temp2 + 2,A6 ; restore these registers lda Temp sta WRtxt1 + 12 ldw R0,#WrongBox jsr LilBBox ; show ok/cancel box jsr RstrColor cbi sysDBData,#1 rts )r0h0 ;********************************* ;*  @LilBCan - show a cancel box ;* LilBCanBo0h0 ;********************************* ;*  @LilBCan - show a cancel box ;* LilBCanBox - cancel box data ;* ;*********************************  LilBCan: plw R13 ; retreive address 0h0 plw R15 ; get string addresses plw R14 phw R13 ; push address back ldw R0,#LilBCanBox jsr LilBBox cbi sysDBData,#2 rts LilBCanBox:  .byte $80 | $01 .byte $02,$0f,$41 ;cancel icon .byte 12 ;add text .byte $12,$12 .byte R14 .byte 1 ;add text .byte $12,$22 .byte R15 .byte 0 ;end of defintion _u0h0 ;********************************* ;*  @DoSetup - Find appropriate file to complete ;* a Read, Run, or Copy command. Return ;* file information (if found) to routin0h0 ;********************************* ;*  @DoSetup - Find appropriate file to complete ;* a Read, Run, or Copy command. Return ;* file information (if found) to routine ;*********************************  DoSetup: sta Temp2 ; b=66,t=84,p=80 (file type) lda #46 ; add a '.' sta Temp2+1 cbi Temp2,#0 ; null header sent beq 90$ ldy #0 ldx #2 ; point ahead of prefix bra 10$ 90$: ldy #0 ldx #0 ; handle LSBRIEFS exception 10$: lda (A6),y cmp #13 ; CR reached in data? beq 11$ sta Temp2,x ; copy to here inx iny bne 10$ 11$: lda #0 sta Temp2,x jsr OpenDisk ; re-open this disk ldw R6,#Temp2 ldb $8863,#0 jsr FindFile ; look for the file ldw R6,#$8400 ldy #$1c lda (R6),y sta SzTmp ; store the file's size inc SzTmp cpx #0 rts LSBRIEFS: .byte "LS BRIEFS",13 x0h0 ;********************************* ;*  @DoRunIt - find and run b.filename by ;* putting drive pokes into the BASIC buffer ;* and dropping out of GEOS. ;****0h0 ;********************************* ;*  @DoRunIt - find and run b.filename by ;* putting drive pokes into the BASIC buffer ;* and dropping out of GEOS. ;********************************* DoRunIt: lda #66 jsr DoSetup ; find runable file beq 10$ lda #0 jsr DoSetup ; find without the ".b" beq 10$ jsr WrongDisk ; prompt for right disk beq DoRunIt jmp RGitOut ; go back to little box 10$: ldb $2e,#8 adb SzTmp,$2e ldw $37,#$9fff ldw R0,#RUtxt0 ; load def. drive pokes ldy #8 cbi curDrive,#10 blt 11$ ; calculate drive to make def. lda #'1' bne 12$ 11$: clc adc #48 ; add first char 12$: sta (R0),y iny cbi curDrive,#10 bgt 13$ lda #':' ; add second char bne 14$ 13$: clc adc #38 14$: sta (R0),y ldw R0,#RUtxt0 ; the BASIC $ will be here ldw R7,#$0801 jmp ToBasic ; bye bye presenter! |0h0 ;********************************* ;* @ DoReadIt - find file to read, draw the ;* read it box, then pass control to Clicks4 ;* t0h0 ;********************************* ;* @ DoReadIt - find file to read, draw the ;* read it box, then pass control to Clicks4 ;* to handle mouse movements.  @ReRead-  ;* Set up read vectors only. ;********************************* DoReadIt: lda #84 ; first check for t. (unpacked) jsr DoSetup beq 10$ lda #80 ; then check for p. jsr DoSetup beq 10$ jsr WrongDisk ; prompt for new disk beq DoReadIt jmp RGitOut ; cancel hit, so get out 10$: jsr i_GraphicsString .byte NEWPATTERN,0 .byte MOVEPENTO,0+56,0,0+16 .byte RECTANGLETO,63-56,1,199-16 .byte NEWPATTERN,1 ; build the readit box .byte MOVEPENTO,0+58,0,0+18 .byte FRAME_RECTO,63-58,1,199-18 .byte 0 ldw A0,#COLOR_MATRIX + 86 ldx #21 11$: ldy #26 ; make the readit box grey 12$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 12$ ; fix colors avw #40,A0 dex bne 11$ jsr ReRead jsr GetGarbage ; get garbage chars jsr ReadFirst ; read the first page rts ReRead: ldw otherPressVec,#Clicks4 ldb mouseTop,#0+16 ldb mouseBottom,#199-16 ldw mouseLeft,#0+56 ; set up readit handlers ldw mouseRight,#319-56 ldy #100 ldw R11,#165 sec jsr StartMouseMode ; move the mouse ldb faultData,#0 ; RClean handles up/dn ldw mouseFaultVec,#RClean rts &i0h0h0 ;********************************* ;*  @GetGarbage  - get unknown chars at the ;* beginning of a packed file. Save Track and ;* Sector info for first page. ;********************************* GetGarbage: mvw $8401,R1 ; for R1 mvw R1,RTop mvw R1,TSuse ldw R4,#BlkBuf ; get first block jsr GetBlock ldw R5,#0 jsr ReadByte ; get garbage bytes jsr ReadByte mvw R5,Byte mvw BlkBuf,TnS ; save vars for reading mvw TnS,R1 mvw TnS,TSchk mvw Byte,RTop+4 mvw TnS,RTop+2 ; save top, first page ldw RTabPtr,#RList-6 rts j0h0 ;********************************* ;*  @RClean - handle mouse page ups & downs ;*  @Stop - handle page faults for print box ;*****************************0h0 ;********************************* ;*  @RClean - handle mouse page ups & downs ;*  @Stop - handle page faults for print box ;********************************* RClean: cpb mouseYPos,mouseTop bne 10$ cwi RTabPtr,#RList ; can't go before the top beq 11$ jmp ReadLast ; up ok, goto prev page 10$: cpb mouseYPos,mouseBottom bne 11$ cbi XSAVE,#0 bne 11$ ; can't go past the end jmp ReadFirst 11$: Stop: rts in0h0 ;****************0h0 ;********************************* ;*  @Clicks4 - handle a click in the reading ;* window.. draw print box, set up Clicks5 ;********************************* Clicks4: lda ClickF beq 10$ ; fixes the click-off "feature" ldb ClickF,#0 rts 10$: inc ClickF ; a click in readit means... jsr i_GraphicString .byte NEWPATTERN,1 .byte MOVEPENTO,115,0,60 .byte RECTANGLETO,202,0,136 .byte NEWPATTERN,0 .byte MOVEPENTO,116,0,61 .byte RECTANGLETO,201,0,135 .byte 0 lda PrtDrv beq 11$ jsr Pcon ; draw Print icon 11$: jsr Dcon ; draw Done icon jsr Ocon ; draw Continue icon ldw otherPressVec,#Clicks5 ldb mouseTop,#60 ldb mouseBottom,#136 ldw mouseLeft,#115 ; set up readit handlers ldw mouseRight,#202 ldy #100 ldw R11,#165 sec jsr StartMouseMode ; move the mouse ldb faultData,#0 ; RClean handles up/dn ldw mouseFaultVec,#Stop rts /s0h0 ;********************************* ;*  @Clicks5 - handle clicks in the print box ;* clean up0h0 ;********************************* ;*  @Clicks5 - handle clicks in the print box ;* clean up for done, and continue ;********************************* Clicks5: lda ClickF beq 10$ ; fixes the click-off "feature" ldb ClickF,#0 rts 10$: inc ClickF ; a click in readit means... ldw R3,#$89 ; left of click ldw R4,#$b6 ; right of click lda PrtDrv beq 11$ ldw R2,#(80*256)+67 ; the print box jsr IsMseInRegion cmp #$ff ; print box clicked? bne 11$ jsr InvertMe jsr SwapDrv ; swap in printer driver ldw R2,#(80*256)+67 ; the print box jsr InvertMe ; print clicked! jmp DoPrint 11$: ldw R2,#(103*256)+90 jsr IsMseInRegion cmp #$ff ; done button clicked? bne 13$ jsr InvertMe ldw R2,#(103*256)+90 jsr InvertMe ; done button clicked jsr RIclean ; clean up, yer done 12$: rts 13$: ldw R2,#(126*256)+113 jsr IsMseInRegion cmp #$ff ; continue button clicked? bne 12$ jsr InvertMe jsr ReRead ldw R2,#(126*256)+113 jsr InvertMe ; continue button clicked ldw R3,#6 adw R3,RTabPtr ; set up last as this jsr RTabLast ; get the proper block jmp ReadNext ; read the page over InvertMe: ldw R3,#$89 ; left of click ldw R4,#$b6 ; right of click jmp InvertRectangle nw0h0 ;****************0h0 ;********************************* ;*  @RIclean - clean up ReadIt stuff. Return ;* control to "little" menu and Clicks3. ;*  @Add2B -  Add a char to  printable BString ;********************************* RIclean: ldb R2L,#0 ; restore and return ldb R2H,#199 ldw R3,#0 ldw R4,#319 jsr RecoverRectangle ; get stuff behind box jsr ReDoMenu ; reinstitute the menu RGitOut: jsr RstrColor ; restore the colors ldw otherPressVec,#Clicks3 mvw BackB,mouseTop mvw BackL,mouseLeft ; little box now in control mvw BackR,mouseRight ldy #100 ldw R11,#165 sec jsr StartMouseMode ; move the mouse back ldb faultData,#0 ldw mouseFaultVec,#CClean jmp DrGoBox ; redraw the little box, bye Add2B: stx R11L ; temporarily save .x ldy R10H sta BString,y ; save the character ldx #0 10$: lda BadChars,x ; check for a bad one beq 11$ ; null, so done cmp BString,y beq 12$ ; found bad one, no add inx bne 10$ ; keep looping 11$: inc R10H ; increment index 12$: ldx R11L ; restore .x, exit rts BadChars: .byte 24,25,26,27,127,128,0 &{0h0 ;********************************* ;*  @RTabAdd - Add track and sector info for ;* a new page to the page table. ;*  @RTabLast - restore and0h0 ;********************************* ;*  @RTabAdd - Add track and sector info for ;* a new page to the page table. ;*  @RTabLast - restore and return to previous page. ;********************************* RTabAdd: avw #6,RTabPtr mvw RTabPtr,R3 ; save pos, this page. ldy #0 lda TSuse sta (R3),y ; save current page iny lda TSuse+1 sta (R3),y iny lda TSchk sta (R3),y ; save compare value iny lda TSchk+1 sta (R3),y iny lda Byte ; save position sta (R3),y iny lda Byte+1 sta (R3),y rts RTabLast: ldw R3,#6 ; go to previous page sbw R3,RTabPtr mvw RTabPtr,R3 ldy #0 lda (R3),y sta TSuse iny ; save new current page lda (R3),y sta TSuse+1 iny lda (R3),y sta TSchk iny ; save page to check lda (R3),y sta TSchk+1 iny lda (R3),y sta Byte iny ; save new position lda (R3),y sta Byte+1 mvw TSchk,TnS mvw TSuse,R1 ldw R4,#BlkBuf ; get the old block jsr GetBlock rts (|0h0 ;********************************0h0 ;********************************* ;*  @ReadLine - read and print a line of text ;*  @ReadFirst, ReadLast, ReadNext - read ;* and print whole pages of text. ;********************************* ReadLine: mvw TnS,R1 mvw Byte,R5 ; set up read buffer ldw R4,#BlkBuf ldw A0,#AString mvw BlkBuf,TSnxt 10$: jsr ReadByte ldy #0 ; store char in line sta (A0),y cmp #0 beq 11$ cpx #0 bne 11$ ; error or eof? exit cmp #13 beq 11$ ; carriage return? exit avw #1,A0 bra 10$ ; add to pointer & go back 11$: lda #13 ; always end string w/ cr sta (A0),y mvw R1,TnS mvw R5,Byte ; save read buf vars ldw R0,#AString stx XSAVE cpw TSnxt,BlkBuf ; now note TS changes beq 12$ mvw TSchk,TSuse ; save last nxt (THIS) T&S mvw BlkBuf,TSchk ; save new next 12$: rts ReadFirst: jsr RTabAdd ; read the first page bra ReadNext ReadLast: jsr RTabLast ; read a previous page ReadNext: jsr i_GraphicsString ; read the next page .byte NEWPATTERN,0 ; cleat the page .byte MOVEPENTO,0+59,0,0+19 .byte RECTANGLETO,63-59,1,199-19 .byte 0 ldb LineY,#18+11 ; init page position ldw LineX,#64 10$: jsr ReadLine ; get a line mvw LineX,R11 mvb LineY,R1H jsr XString ; write a line avw #11,LineY cbi LineY,#199-18 bgt 11$ ; check pos cbi XSAVE,#0 beq 10$ ; check file status 11$: rts Uo0h0 ;********************************* ;*  @DoPrint - Print the document currently ;* being read. ;********************************* DoPrint: jsr InitForPrint 0h0 ;********************************* ;*  @DoPrint - Print the document currently ;* being read. ;********************************* DoPrint: jsr InitForPrint ; init the printer jsr StartASCII ; check for ready status cpx #0 beq 10$ ; if printer not ready... 99$: jsr StopPrint jmp SwapDrv ; swap out printer driver 10$: lda #84 jsr DoSetup beq 19$ lda #80 jsr DoSetup bne 99$ 19$: jsr GetGarbage jsr i_GraphicsString .byte NEWPATTERN,0 .byte MOVEPENTO,116,0,61 .byte RECTANGLETO,201,0,135 .byte ESC_PUTSTRING,138,0,96 .byte 24,"Printing...",27,0 11$: jsr ReadLine ldw R10,#$ff ; indices to AString,BString 12$: inc R10L ldx R10L ; read a packed character lda AString,x tax beq 20$ ; abnormal exit-- done! lda Trans1,x ; get first code bne 13$ lda Trans2,x jsr Add2B ; straight translation bra 12$ 13$: cmp #13 ; carriage return bne 15$ jsr Add2B 14$: lda #0 ; terminate the string jsr Add2B bra 20$ ; CR found , output 15$: cmp #$ff ; space case bne 17$ cpx #12 ; abort if too many spaces bge 14$ 16$: lda #32 jsr Add2B dex bne 16$ bra 12$ 17$: jsr Add2B lda Trans2,x jsr Add2B bra 12$ 20$: ldw R0,#BString ldw R1,#PrintBuff jsr PrintASCII cbi XSAVE,#0 beq 11$ jsr StopPrint jsr SwapDrv ; swap out printer driver jmp DoReadIt t0h0 ;********************************* ;*  @DoCopyIt - find first file to copy, get dest ;* drive, and call routines to create and copy ;* the files and display progress messages. 0h0 ;********************************* ;*  @DoCopyIt - find first file to copy, get dest ;* drive, and call routines to create and copy ;* the files and display progress messages. ;*********************************   DoCopyIt: jsr OpenFonS ; open FilesOnSide, get info beq 11$ 10$: jmp RGitOut 11$: jsr GetFonS ; read first Filename var bne 10$ mvb curDrive,CSrc ; have source drive! jsr PickDrive ; pick destination drive beq 10$ tax lda DrvInfo-8,x bne 10$ ; drive wasn't there! cpx CSrc beq 10$ ; same as source! stx CDst ; have destination drive! 12$: jsr SetCpyF ; open source file bne 14$  lda CDst ; open destination drive jsr SetDevice jsr OpenDisk ; get destination BAM cpx #0 bne 15$  jsr CreateF ; create file bne 15$ jsr CopingBox ; build file progress box 13$: jsr CopyFile ; copy some blocks bne 15$ cbi CopCont,#0 ; more blocks to do bne 13$ jsr NoCope ; recover box lda Num2Copy ; get next file? beq 14$  lda CSrc ; open destination drive jsr SetDevice jsr OpenDisk ; get destination BAM cpx #0 bne 15$  jsr GetFonS ; read first Filename var beq 12$ 14$: lda CSrc jsr SetDevice jmp RGitOut ; non-error exit 15$: jsr DoR6Error ; disk error aborting exit lda CSrc ; go back to LS drive jsr SetDevice jmp RGitOut jsr SetDevice jmp RGitOut 0h0 SetCpyF: lda CSrc jsr SetDevice jsr OpenDisk ldb $8863,#0 ldw R6,#Filename jsr FindFile cpx #0 bne 99$  ldw R0,#$8400 ; copy src dir blk ldw R1,#SDirBlk ldw R2,#$001e jsr MoveData ; save source dir block ldx #0 99$: rts dir blk ldw R1,#SDirBlk ldw R2,#$001e jsr MoveData ; save source dir block ldx #0 99$: rts lock 99$: rts de jsr FindFile ; find Files On Side X cpx #0 beq 10$ ; not found, so look around 96$: cbi Temp+5,#49 bne 97$ 0h0 ;********************************* ;*  @OpenFonS - find/read FilesOnSide file ;* A8 has file side # ;* A6 has index into Features ;********************************* OpenFonS: ldb FilesOnSide+14,#48 ldy #0 lda (A8),y ; set right file side # sta FilesOnSide+14 sta Temp+5 ; store this for future checks jsr OpenDisk ; re-open this cpx #0 bne 99$ 90$: ldw R6,#FilesOnSide jsr FindFile ; find Files On Side X cpx #0 beq 10$ ; not found, so look around 96$: cbi Temp+5,#49 bne 97$ ; is it supposed to be disk 1? cbi FilesOnSide+14,#52 ; have we checked them all? beq 97$ inc FilesOnSide+14 ; check the next file bne 90$ 97$: jsr WrongDisk ; just plain wrong..show box beq OpenFonS ; try it again 99$: rts 10$: ldb Temp2,#66 ; 'b' added to filename ldb Temp2+1,#46 ; '.' added to filename ldy #0 11$: lda (A6),y sta Temp2+2,y ; copy rest of filename iny cmp #13 bne 11$ ; keep copying until CR mvw $8401,R1 ldw R4,#FBlkBuf jsr GetBlock ; get first block of filesonside ldw R5,#0 ldb Temp+3,#0 ; clear line indices 12$: cmp #13 ; check for last char first beq 14$ ; found! yeah! 94$: jsr ReadByte cpx #0 beq 13$ 95$: bne 96$ ; EOL! Argh! not found!!!!!! 13$: ldy Temp+3 inc Temp+3 ; checking... cmp Temp2,y beq 12$ ; so far, so good.. loop ldy #0 ; not it, so look for CR sty Temp+3 ; clear counter again cmp #13 beq 94$ ; all ready for next line jsr Rd2CR ; finish off this line beq 94$ ; EOF was found.. wery bad bne 95$ ; ready to check next thing 14$: jsr TransNum ; get Num2Copy from file jsr Rd2CR ; skip total blocks for now mvw R5,CpyByt mvw R4,CpyTnS 15$: lda #0 rts 98$: lda #1 rts 0h0 ;********************************* ;*  @TransNum - read & translate the num of ;* files in this group and return in Num2Copy ;********************************* TransNum: ldb Num2Copy,#0 ; remember petskii translation jsr ReadByte ; this should be a space jsr ReadByte ; first digit sta Temp+3 ; if this is the low digit sta Temp+4 ; but it may be the high digit ldb Temp+5,#0 ; first digit hb is zero jsr ReadByte ; second digit, or CR cmp #13 beq 14$ ; nothing to process cmp #32 ; i said, nothing to process beq 14$ sta Temp+3 ; hold low digit for later lda Temp+4 sec sbc #48 ; get digit down to size sta R15L ldb R15H,#10 ldy #R15H ldx #R15L jsr BBMult ; multiply 1st digit by ten mvb R15L,Num2Copy ; this should be right now 14$: jsr Rd2CR ; get that CR lda Temp+3 sec sbc #48 ; get digit down to size clc adc Num2Copy ; most sig digit added 0h0 sta Num2Copy rts Num2Copy rts y rts rts rts et first block of fi0h0 ;********************************* ;*  @GetFoS -  copy the next filename ;* from FilesOnSide file into Filename ;********************************* GetFonS: mvw CpyByt,R5 mvw CpyTnS,R4 ldy #0 sty R15L ; set up first filename 10$: jsr ReadByte cpx #0 bne 99$ ; ouch! another EOF cmp #',' ; comma is delimiter beq 11$ ldy R15L sta Filename,y ; copy a char inc R15L bne 10$ ; until done 11$: ldy R15L ; set the EOL char lda #0 sta Filename,y jsr Rd2CR ; finish this line mvw R5,CpyByt mvw R4,CpyTnS dec Num2Copy ldx #0 ; return no errors 99$: rts rts rts lda Temp+4 sub #48 ; get digit down to size sta R15L ldb R15H,#0 ; get ready to multiply ldw R14,#10 ldy #R14 ldx #R15 jsr BBMult ; multiply 1st di0h0 ;********************************* ;*  @CreateF - start a copy by creating file ;* on destination drive, and allocating its ;* first block for data. That's all! ;*  @Rd2CR -  ReadByte till a CR is read ;*********************************  CreateF: lda CDst ; open destination drive jsr SetDevice jsr OpenDisk cpx #0 bne 10$ ; error! 11$: ldw R6,#Filename ldb $886e,#$ff jsr FindFile ; look for file on destination cpx #0 bne 13$ ; error! ldx #$ff ; file exists exit! 10$: rts 13$: ldw R2,#3 ldw R6,#DBlkP jsr BlkAlloc ; get first block on dest cpx #0 bne 10$ ldb R10L,#0 jsr GetFreeDirBlk ; find dest dir entry cpx #0 bne 10$ mvw R1,DDirTnS sty DFilPtr ldb DFilPtr+1,#$80 ; find free dest dir space ldw R0,# SDirBlk 0h0 mvw DFilPtr,R1 ldw R2,#$1e jsr MoveData ; copy dir entry src->dst  ldw R0,# SDirBlk  mvw DFilPtr,R1 0h0 ldy #1 lda (R0),y sta SNxtTS ; save first readable block lda DBlkP sta (R1),y ; point to 1st writable blk sta DNxtTS ; save first writable blk iny lda (R0),y sta SNxtTS+1 lda DBlkP+1 ; copy first free block sta (R1),y sta DNxtTS+1 mvw DDirTnS,R1 ldw R4,#$8000 jsr PutBlock ; now save dest dir block cpx #0 bne 12$ jsr PutDirHead ; resave the BAM cpx #0 bne 12$ mvb DNxtTS,CopCont cpx #0 12$: rts  Rd2CR: jsr ReadByte cpx #0 bne 99$ ; ouch! EOF! cmp #13 bne Rd2CR ; keep looking for CR 99$: rts o check next thing 14$: jsr TransNum 0h0 ;********************************* ;*  @CopyFile - copies a block by taking T&S ;* info from previous CopyFile or StartThis ;* and doing a Copy/Paste on the new block. ;*********************************  CopyFile:  ; ** copies a single block src->dst and sets up for next block  lda CSrc jsr SetDevice ; set up source drive jsr OpenDisk cpx #0 bne 99$ ldw R4,#CopyBuf 10$: jsr getBLK bne 99$ mvw R4,LastBlk ; save where I am in buf cwi R4,CopyEnd ; get as many blocks... bgt 11$ cbi SNxtTS,#0 ; this is last block! bne 10$ 11$: lda CDst jsr SetDevice jsr OpenDisk cpx #0 bne 99$ ldw DBlkPtr,#CopyBuf ; start from start 12$: jsr putBLK bne 99$ cbi DNxtTS,#0 ; this is last block! beq 13$ cpw DBlkPtr,LastBlk ; get as many blocks... blt 12$ 13$: jsr PutDirHead mvb SNxtTS,CopCont cpx #0 99$: rts cpx #0 99$: rts rts rts ldw R0,# SDirBlk  mvw DFilPtr,R1 0h0 ldy #1 lda (R0),y sta SNxtTS ; save first readable 0h0 ;********************************* ;*  @getBLK - get one block, ready next ;*  @putBLK - put one block, ready next ;*  @MakeFreB -  alloc next block ;*********************************  getBLK: mvw SNxtTS,R1 jsr GetBlock ; get a source block cpx #0 bne 11$ ldy #0 lda (R4),y sta SNxtTS iny lda (R4),y sta SNxtTS+1 inc R4H cpx #0 11$: rts MakeFreB: ldw R2,#3 ldw R6,#DBlkP jsr BlkAlloc ; get next TnS on dest cpx #0 bne 11$  mvw DBlkPtr,R4  ldy #0 0h0 lda DBlkP sta (R4),y ; make new TnS link iny lda DBlkP+1 sta (R4),y cpx #0 11$: rts putBLK: mvw DBlkPtr,R4 ldy #0 lda (R4),y ; this is last block! beq 98$ jsr MakeFreB ; set buf block for next bne 99$ 98$: mvw DBlkPtr,R4 mvw DNxtTS,R1 jsr PutBlock ; write next block on dest cpx #0 bne 99$ inc DBlkPtr+1 mvw DBlkP,DNxtTS ; save next writable block cpx #0 99$: rts R1 0h0 ldy #1 lda (R0),y sta SNxtTS ; save first readable 0h0 ;********************************* ;*  @CpyFname - copy a filename into a ;* new place ;*********************************  CpyFname: ; *** R0 should point to the filename to copy, which ends in $A0 ldw R1,#Filename ldy #0 12$: lda (R0),y cmp #$a0 ; copy next filename to buf beq 13$ sta (R1),y iny bra 12$ 13$: lda #0 ; 0 is new delimeter sta (R1),y ; R1 is the destination rts 0h0 ;********************************* ;*  @NextFonS0h0 ;********************************* ;*  @PickDrive - reads in all disks names and ;* allows the user to select destination drive ;* for CopyIt. ;*********************************   PickDrive: ldw A0,#COLOR_MATRIX + 170 ldy #19 10$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 10$ ; fix first line avw #40,A0 ldx #14 11$: ldy #20 ; fix colors 12$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 12$ ; fix colors avw #40,A0 dex bne 11$ avw #1,A0 ldy #19 13$: lda #( 11 * 16 ) + 15 sta (A0),y ylp 13$ ; fix last line ldw A2L,#18 mvb curDrive,DrvInfo+3 ldw A1,#AName ; put A drives name up lda #8 jsr DriveRtn ldw A1,#BName ; put B drives name up lda #9 jsr DriveRtn ldw A1,#CName ; put C drives name up lda #10 jsr DriveRtn lda DrvInfo+3 jsr SetDevice ; go back to LS drive jsr OpenDisk ldw R0,#CopyBox jsr DoDlgBox ; ask for destination disk cbi sysDBData,#2 ; was cancel hit? rts   jsr ReadFirst ; read the first page rts ReRead: ldw otherP0h0 ;********************************* ;* @ RtnA, RtnB, RtnC - click handlers for ABC ;*  @DriveRtn - finds a disks name and copies ;* it into the PickDrive dialog box. ;*********************************  RtnA: ldb sysDBData,#8 ; A drive selected jmp RstrFrmDialogue RtnB: ldb sysDBData,#9 ; B drive selected jmp RstrFrmDialogue RtnC: ldb sysDBData,#10 ; C drive selected jmp RstrFrmDialogue DriveRtn: jsr SetDevice jsr OpenDisk ; set new disk to read ldy curDrive txa sta DrvInfo-8,y ; save drive status cpx #0 bne 10$ ; error in drive? ldw A2L,#18 jsr MoveDrNm ; copy its name to slot 99$: rts 10$: ldw A0,#NOtxt0 ldx #A0 ; copy "no device" message ldy #A1 jmp CopyString jmp CopyString me up lda #10h0 ;********************************* ;* Here are the variables from the start of ;* free ram. ;********************************* .ramsect ; @General Disk/Screen Info DiskNm: .block 20 ; current disks name LSDrive: .block 21 ; loadstar drive and disk name DADrive: .block 21 ; boot up drive and disk name DAText: .block 148 ; filenames for desk accessories Temp: .block 30 ; temporary space for various uses Temp2: .block 28 ; temporary space for various uses Colors: .block 10 ; space to save screen color defaults ClickF: .block 1 ; flag for mouse press, release RegSave: .block 20*2 ColorSave: .block 1001 ; background color saving space BackB: .block 2 ; window size info for restoring BackR: .block 2 ; RHS window BackL: .block 2 LsavT: .block 2 ; window size info for little box Lnum: .block 2 Ldex: .block 60 ; index into files under a feature Pdex: .block 40 ; index into main features PData: .block 5000 ; the "features" file-- complete eY: .block 1 ; current char y pos0h0 ; @* ReadIt Variables Byte: .block 2 ; position pointer in a disk sector TnS: .block 2 ; current track and sector info BlkBuf: .block 300 ; holds current block of file data XSAVE: .block 1 ; temporary save of read error .x RTop: .block 6 ; T&S info for top of document RTabPtr: .block 2 ; current page pointer in reading CopyBuf: .block 744 ; DoCopyIt buffer, falls through... RList: .block 1000 ; list of T&Ss for read file pages CopyEnd: .block 256 TSuse: .block 2 ; this pages top T&S information TSchk: .block 2 ; this pages T&S to compare TSnxt: .block 2 ; next pages tentative T&S info AString: .block 100 ; read in ascii string to disply BString: ; translated line of text, ready 2 go AName: .block 20 ; name of disk in drive A (DoCopyIt) BName: .block 20 ; name of disk in drive B (DoCopyIt) CName: .block 20 ; name of disk in drive C (DoCopyIt) DrvInfo: .block 20 ; temp drive status info (DoCopyIt) Filename: .block 20 ; current filename being DoCopyIted LineX: .block 2 ; current char x position in window LineY: .block 1 ; current char y position in window SzTmp: .block 1 ; size of file, returned by DoSetup PrtDrv: .block 1 ; print driver flag FBlkBuf: ; FilesOnSide buffer for DoCopyIt PrintBuf: .block 300 ; buffer the print driver asks for SDirBlk: .block 340 ; rest of PrintBuf & DoCopyIt src blk PrtDrvBuf: .block 1599 ; printer driver buffer ; printer driver buffer er beq 94$ ; EOF was found.. wery bad bne 95$ ; ready to check next thing 14$: jsr TransNum 0h0 ; @DoCopyIt resident variables (some above) Num2Copy: .block 1 ; number of files remaining to copy CSrc: .block 1 ; current copy source drive CDst: .block 1 ; current copy dest. drive SFilPtr: .block 2 ; pointer to source file in dir block SNxtTS: .block 2 ; T&S to read next from file DBlkP: .block 6 ; alloc buffer for new dest block DBlkPtr: .block 4 ; pointer to next buffer point DFilPtr: .block 2 ; pointer to dest filename space DDirTnS: .block 2 ; track and sector of dest dir block DNxtTS: .block 2 ; next T&S to write to dest file CopCont: .block 1 ; flag to continue copy non-0=yes LastBlk: .block 2 CpyByt: .block 2 CpyTnS: .block 2 TheEnd: .block 1 ; for mem use curiousity go AName: .block 20 ; name of disk s???~>???~>?~?x~~~>~>?~>~>~>p~ >p?~>?0~`?~>0?0x`~> 0?0`~>0`> ~>8~ > ??/\BKvٞٳٞٳٳ?03 DirBlk jsr GetBlock ; get next dir block cpx #0 bne 90$ ldw SFilPtr,#SDirBlk+2 bra 10$ 90$: rts 10$: mvw SFilPtr,R0 ldy #0 lda (R0),y ; check for non-file beS/geoLS2txtc$0PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&@` $)Z[ZZZZ ;********************************* ;*  @LoadStar Presenter! - rev. 2 (1.7) ;* Text and misc data ;* By Bo Zimmerman ;* Completed February , 1997 ;* Revised January, 1998 ;********************************* .if Pass1 .noeqin .noglbl .include GEOSequates .eqin .glbl .endif e of Contents (abbreviated) ; Run It - 6 ; Read It - 7 ; Copy It ; Variables in free ram 18  .psect .psect .psect in free ram 18  .psect ect (abbreviated) ; Run It - 6  @0 ;********************************* ;*  @CopingBox - progress filename box for ;* copyit.  @NoCope - erases CopingBox ;* ErrorBox - data for aborted CopyIt ;*********************************  CopingBox: ldb $2f,#$80 jsr $c1a8 ; i_GraphicsString .byte 5,1 ; newpattern .byte 1,$60,$00,$28 ; movepento;5e,25 .byte 3,$f7,$00,$9f ; rectangleto;f7,9f .byte 5,0 .byte 1,$58,$00,$20 .byte 3,$ef,$00,$97 ; $ef,$00,$97 .byte 5,1 .byte 1,$58,$00,$20 .byte 7,$ef,$00,$97 ; frame_recto .byte 6,$83,$00,$40 .byte $18,"Copying...",27,0 ldw $02,#Filename ;r0 ldw $18,#$07f ;r11 ldb $05,#$60 ;r1H jsr $c148 ; putstring ;ldb $2f,#($80 | $40) ; upsets LClean rts NoCope: ldb $06,$20 ;top ldb $07,$9f ;bottom ldw $08,$0058 ;left ldw $0a,$00f7 ;right jmp $c12d ; recover rectangle ErrorBox: .byte $00 | 01 ;user position .byte $20 ;top .byte $97 ;bottom .word $058 ;left .word $0ef ;right .byte 11 .byte $20,$20 .word CBtxt1 .byte 12 .byte $20,$37 .byte $0e ;R6 .byte $02,$05,$59 ;cancel icon .byte 0 CBtxt1: .byte $18,"Operation aborted:",27,0  @0 ;********************************* ;*  @DoR6Error - show a copyit error message ;* from the .x register. ;* ;********************************* DoR6Error: ldw $0e,#ERtxt0 cpx #$ff beq 17$ ldw $0e,#ERtxt1 cpx #3 beq 17$ ldw $0e,#ERtxt2 cpx #5 beq 17$ ldw $0e,#ERtxt3 cpx #11 beq 17$ ldw $0e,#ERtxt4 cpx #13 beq 17$ ldw $0e,#ERtxt5 cpx #31 beq 17$ ldw $0e,#ERtxt6 cpx #32 beq 17$ ldw $0e,#ERtxt7 cpx #39 beq 17$ ldw $0e,#ERtxt8 17$: ldw R0,#ErrorBox jmp $c256 ; dodlgbox  0 .byte $18,"Copying...",27,0 ldw $02,#Filename ;r0 ldw $18,#$06f ;r11 ldb $05,#$60 ;r1H jsr $c148 ; putstring ;ldb $2f,#($80 | $40) ; upsets LClean rts NoCope: ldb $06,$20 ;top ldb $07,$9f ;bottom ldw $08,$0058  @0 ;********************************* ;* CopyBox - this is the pickdrive box which ;* include A,B,C, icons, Cancel, and disk ;* names. ;*********************************  CopyBox: .byte $00 | 01 ;user position .byte $20 ;top .byte $97 ;bottom .word $058 ;left .word $0ef ;right .byte 18 ;user icon .byte $01,$15 .word Acon .byte 11 .byte $3a,$20 .word AName .byte 18 ;user icon .byte $01,$2c .word Bcon .byte 11 .byte $3a,$37 .word BName .byte 18 ;user icon .byte $01,$43 .word Ccon .byte 11 .byte $3a,$4d .word CName .byte $02,$05,$59 ;Cancel icon .byte 11 ;add text .byte $0b,$0e .word CPtxt0 .byte 0 ;end of defintion  t @0 ;********************************* ;* A @0 ;********************************* ;* Acon, Bcon, Ccon - icon and image data ;* for PickDrive (copyit) A,B,C icons. ;* ;*********************************  Acon: .word Amage ;graphic location .word 0 ;leave this at 0 .byte AmgX ;width, set below .byte AmgY ;height, set below .word RtnA ;location of action routine Amage: E AmgX =picW AmgY =picH Bcon: .word Bmage ;graphic location .word 0 ;leave this at 0 .byte BmgX ;width, set below .byte BmgY ;height, set below .word RtnB ;location of action routine Bmage: D BmgX =picW BmgY =picH Ccon: .word Cmage ;graphic location .word 0 ;leave this at 0 .byte CmgX ;width, set below .byte CmgY ;height, set below .word RtnC ;location of action routine Cmage: C CmgX =picW CmgY =picH w @0 ;********************************* ;* Dcon, Pcon, Ocon - icon and image data ;* for Done, Print, Continue box ;*********************************  Dcon: jsr $c1ab ;i_BitmapUp .wor @0 ;********************************* ;* Dcon, Pcon, Ocon - icon and image data ;* for Done, Print, Continue box ;*********************************  Dcon: jsr $c1ab ;i_BitmapUp .word Dmage ;graphic location .byte 17,90 ;column,margin .byte DmgX ;width, set below .byte DmgY ;height, set below rts Dmage: @ DmgX =picW DmgY =picH Pcon: jsr $c1ab ;i_BitmapUp .word Pmage ;graphic location .byte 17,67 ;column,margin .byte PmgX ;width, set below .byte PmgY ;height, set below rts Pmage: A PmgX =picW PmgY =picH Ocon: jsr $c1ab ;i_BitmapUp .word Omage ;graphic location .byte 17,113 ;column,margin .byte OmgX ;width, set below .byte OmgY ;height, set below rts Omage: B OmgX =picW OmgY =picH u| @0 ;********************************* ;* ClearScreen - data for a clear screen ;* OpeninBox - disk selection box data ;* ;*********************************  ClearScreen: ; clear the screen data .byte NEWPATTERN,2 .byte MOVEPENTO,0,0,0 .byte RECTANGLETO .word 319 .byte 199 .byte 0 OpeninBox: .byte $80 | $01 .byte 15 ;gfxstring .word OpeninGfx .byte 11 ;add text .byte $07,$0c .word OBtxt0 .byte 11 .byte $22,$0c ; add more text .word LSDrive+1 .byte 11,$10,23+(0*11) ;add filenames .word PData+(0*17) .byte 11,$10,23+(1*11) ;add filenames .word PData+(1*17) .byte 11,$10,23+(2*11) ;add filenames .word PData+(2*17) .byte 11,$10,23+(3*11) ;add filenames .word PData+(3*17) .byte 11,$10,23+(4*11) ;add filenames .word PData+(4*17) .byte 11,$10,23+(5*11) ;add filenames .word PData+(5*17) .byte 11,$10,23+(6*11) ;add filenames .word PData+(6*17) .byte $05,$11,$07 ;OPEN icon .byte $06,$11,$1c ;DISK icon  .byte $02,$11,$46 ;Cancel icon Opnin2: .byte 18 ;user icon  @0 .byte $11,$31 .word drvcon .byte 0 ;end of defintion OpeninGfx: .byte NEWPATTERN,1 .byte MOVEPENTO,70,0,35 .byte FRAME_RECTO,194,0,124 .byte MOVEPENTO,70,0,47 .byte LINETO,194,0,47 .byte 0  s Re @0 ;********************************* ;* 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,$0d,$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 TablesEnd: .byte 0 0X0 ;********************************* ;* All the happy text strings! ;*********************************  OBtxt0: .byte $18,"Disk:",27,0 CPtxt0: .byte $18,"Copy to which disk:",27,0 WRtxt0: .byte $18,"Please insert LoadStar disk 1",27,0 WRtxt1: .byte $18,"into drive A and click OK.",27,0 GStxt0: .byte "program info",0 ABtxt0: .byte $1a,"LoadStar Presenter",27,0 ABtxt1: .byte $18,"Version 1.7",27,0 ABtxt2: .byte $18,"Written by: Bo Zimmerman",27,0 ABtxt3: .byte $18,"Completed/Revised 1996-1999",27,0 DMtxt0: .byte $18,"Please insert disk:",27,0 DMtxt1: .byte $18,"Into drive: ",27,0 ROtxt0: .byte $18,"Read it!",27,0 ROtxt1: .byte $18,"Run it!",27,0 ROtxt2: .byte $18,"Copy it!",27,0 ERtxt0: .byte $18," ERROR:  File exists!",27,0 ERtxt1: .byte $18," ERROR:  Disk full!",27,0 ERtxt2: .byte $18," ERROR:  File not found!",27,0 ERtxt3: .byte $18," ERROR:  File too long!",27,0 ERtxt4: .byte $18," ERROR:  Device not present!",27,0 ERtxt5: .byte $18," ERROR:  Write protect on!",27,0 ERtxt6: .byte $18," ERROR:  Read error!",27,0 ERtxt7: .byte $18," ERROR:  Write error!",27,0 ERtxt8: .byte $18," ERROR:  Disk error!",27,0 CDtxt0: .byte $18,"Insert new disk into drive.",27,0 Features: .byte "FEATURES",0 FilesOnSide: .byte "FILES ON SIDE 1",0 NLtxt0: .byte $18,"LoadStar files not found!",27,0 MMtxt0: .byte "geos",0 MMtxt1: .byte "issue",0 NOtxt0: .byte "Not Present.",0 IStxt0: .byte "next",0 IStxt1: .byte "quit",0 RUtxt0: .byte "POKE186,9::CLR:RUN:",0 .block 40-20  ehk" ; 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">31x1f1f1f1f33f>fx At   ߞ Bt`{6l6l6l6l6l{   ߞ Bt`{6l6l6l6l6l{3l CUu`{6l6l6l6l6l{3l CUu Du@@ Du@@ Ev?00@@ Ev?00 ;i_BitmapUp .word Pmage ;graphic location .byte 17,67 ;column,margin ?00 ;i_BitmapUp .word Pmage ;graphic location .byte 17,67 ;column,margin .byte PmgX ;width, set below .byte PmgY ;height, set below rts Pmage: A PmgX =picW PmH/geoLS2 PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V1.1GEOPROGRAMMER sample file.8F0` ;********************************* ;*  @LoadStar Presenter! - rev. 2 (1.7) ;* Main header file ;* By Bo Zimmerman ;* Completed January , 1997 ;* Revised January, 1998 ;********************************* .if Pass1 .noeqin .noglbl .include GEOSequates .eqin .glbl .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 $83 ;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 "LS Presenter 1.7",0,0,0,$00 ;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 " " ; auto wraps .byte "",0 .endh ndh %+QQ Jf M! ʭQ Lx !Q Lx0(|(* ©(ͅ *1 (4( `B3*.4*x5* H U * $ Т**3*o[}[ 8 ghijklmno" ; 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 .bytegeoLS2.lnk PRG formatted GEOS file V1.0AWrite Image V2.0geoWrite V2.1  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V&aP ;********************************* ;*  @LoadStar Presenter! - rev. 2 (1.7) ;* Main linker file ;* By Bo Zimmerman ;* Completed January , 1997 ;* Revised January, 1998 ;********************************* .output LS_Presenter .header H/geoLS2.rel .seq .psect $0400 S/geoLS2.rel S/geoLS2rrc.rel S/geoLS2txt.rellrelLS_PRESENT2.DOCa!PRG formatted GEOS file V1.0AWrite Image V2.1geoWrite V2.1!  ...݅ ( >1 59 ..  9 < <` " . r " `(@1ʎsAڢ9 V& '#"0h0 @GEOS Loadstar Presenter Rev. 2 by: Bo Zimmerman 0h0Introduction: 00  This is for all you geoJunkies out there with the same mission as I: to find point and click solutions for all the things we would normally do in "C64" mode. Enjoying our issues of Loadstar should be no exception. 0h0 GEOS Loadstar Presenter is intended to be a GEOS replacement (well, a partial replacement) of the normal Presenter you load to read, run, and copy from your issues of Loadstar. It features full text browsing support, ability to use 3.5" or 5.25" formats, program execution right from the menus (for the non-GEOS programs), desk accessory access, and program copy support. All of the familiar Loadstar features and files are arranged as you find them in the normal Presenter with one exception-- they are all point and clickable with your GEOS supported input device.  @How to use the program  When you receive your issue of Loadstar in the mail, your first step will be to load GEOS and launch the GEOS Loadstar Presenter by double clicking on its icon. The Presenter will then give you a dialog box which looks suspiciously like a file selector. It has the name of the current disk in a box on the top, below which is a list of the first few files on the disk. On the right are a series of buttons: OK, Drive, Disk, and Quit. From here, you will have to insert disk #1 of your Loadstar issue into any of your GEOS supported disk drives. If the drive containing the issue is the same as the drive from which you launched the GEOS Presenter, then you will want to click on the Disk icon which notifies the program of a disk change. If the Loadstar issue disk is on another drive, you will want to click on the Drive icon. The Drive icon will cycle through up to three of your GEOS drives and show the contents of their disks. When you have selected the disk containing your issue of Loadstar, click on the Open button to begin reading the disk. If you have the wrong disk, or the wrong side of a 5.25" disk in the drive, an error message "Loadstar files not found" will appear. The Quit button will take you back to the deskTop. After opening your issue, the familiar Loadstar logo and features will appear on your screen along with a menu along the top of the screen. The features along the left side of the screen are in fact buttons, and may be clicked on to reveal the files in that section on a separate menu on the right side of your screen. Clicking on a file name in this new menu will bring up the familiar box with the "Read it!, "Run it!", and "Copy it!" options. Clicking on one of these options will initiate it. If you wish to exit from one of these submenus without making a selection, you have simply to move your pointer outside of the menu area to go back to a previous menu. If you select a "Read It!" option, you will be presented with a large light grey reading window. Those of you using the 5.25" format of Loadstar may be prompted to insert a different Loadstar disk, which you should then do. In the reading window, you may scroll both up and down within the text by pushing your pointer up against the top and bottom of the reading window respectively. Text may not appear quite as well formatted in the reading window as it does in the normal Presenter, but this is due to fact that the GEOS BSW font is of variable size, while the 40 column font in normal "C64" mode is fixed size. Still, you should find reading easy and smooth in the GEOS presenter. To exit from the reading window, you need only click once within the window. This will bring up your exit selections window. Within this window are three options. Choosing "Continue" will take you back to the reading screen and "Done" will bring you back to the "Read It!" window. Selecting "Print" will begin dumping the text file to your printer. For this option to work, your printer driver must have been present on the same disk from which you launched the Presenter application. If you choose a "Run It!" option, the program will initiate the loading of the program, drop out of GEOS, and pass control to the C64's normal mode of operation. Of course, when you wish to exit from the program you run, it will attempt to bring you back to the regular Presenter instead of the GEOS Presenter. You can thwart this by hitting the RESTORE key to re-boot GEOS and then re-launching the GEOS Presenter. This |0h00h0 may not work for all programs run from Loadstar, as it requires that the program you run not mess with the GEOS re-boot code that GEOS leaves behind in memory. It is also feasible that some programs may not run correctly from the GEOS Presenter for one reason or another (though I havn't found one that wouldn't run yet), but these are minor concerns for the point-and-click benefits (at least I think so :). The "Copy It!" option will only support drive-to-drive copies, which means you should have more than one drive active in GEOS to use this option. You will first be given a selection box with an A, B, and C button for each drive, along with the name of the disk in that drive, or "No Device" if that drive was not found by the program. Select the destination disk for your copy by clicking on the appropriate disk's drive button. The Presenter will then begin to copy the files from the Loadstar disk to the destination disk. Note that the GEOS Presenter can not copy GEOS "VLIR" files, but then, neither can the regular presenter, and it is easy enough to do from the deskTop. On the top of the screen is a standard GEOS menu with two sections. Under the "geos" section, you will find the standard "program info" option, along with a list of the desk accessories which were found on the disk from which you launched the presenter. Selecting one of the desk accessories will execute them, though you may be prompted to re-insert the disk from which you launched the presenter if you have removed it. The other section on the top menu is "issue". Under here are two selections. "next" will bring you back to the Loadstar disk selection box you found when you booted the Presenter, so that you may view another issue. "quit" will take you straight back to the deskTop.  @Revision Notes:  This is actually a very mild revision as far as functionality is concerned, but included a lot of code rewriting to reflect some changes in convention over at LoadStar. The "Copy" function will now use the "files on disk X" files to build a file copy list instead of using the directory dividers that apparently aren't present on some "pass around" copies of the disk magazine. Changes in the text packing routines have been implemented to reflect the new scheme. Hopefully it is up to date now. Printer options have been added, and to lend further support to single drive users, the printer driver is actually buffered upon boot up so that the user need not swap disks when he or she wishes to print.=Dl >il On the right are a series of buttons: OK, Drive, Disk, and Quit. From here, you will have to insert disk #1 of your Loadstar issue into >il On the right are a series of buttons: OK, Drive, Disk, and Quit. From here, you will have to insert disk #1 of your Loadstar issue into any of your GEOS supported disk drives.