Miscalleneous routines III
THE 'COPY SCREEN' ROUTINE
This routine has two entry points. The first one, #301D, is used with the BASIC commands
'SAVE/LOAD/VERIFY/MERGE SCREEN$'. The second entry point (#3020) is used for the 'COPY'
command itself. Depending on the parameter following the 'SCREEN$', the normal or the
grey scale screen dump is used.
301D DUMP_SCR$ POP HL Drop the return address (within the
routine which called 'EXPT_PARMS').
301E JR #3026,COPY_1 Jump forward.
3020 COPY RST #28,NEXT_C Advance CH_ADD.
3021 CP 170,"SCREEN$" Give 'Nonsense in G+DOS' error if
3023 JP NZ,#1644,REP_0 command isn't followed by 'SCREEN$'.
3026 COPY_1 LD A,49,"1" Default is '1' for 'normal' dump.
3028 LD (#3E00),A
302B RST #28,NEXT_C Advance CH_ADD
302C CP 13
302E JR Z,#3038,COPY_2 Jump with ENTER.
3030 CP 58,":"
3032 JR Z,#3038,COPY_2 Also jump with ':'.
3034 LD (#3E00),A Otherwise store character.
3037 RST #28,NEXT_C Update CH_ADD again.
3038 COPY_2 CALL #3148,ST_END_RAM Confirm end of statement and exit
during syntax checking.
303B LD A,(#3E00)
303E CP 49,"1" Normal screendump if '1' followed the
3040 CALL Z,#12D2,COPS 'SCREEN$'.
3043 CP 50,"2" Grey scale in case of a '2'.
3045 CALL Z,#133E,COPS2 Ignore other values.
3048 JP #047C,END Finished.