; ; *** Tape SAVE and LOAD for VTL-2 *** ; ; For $0FB0-loaded VTL-2 ; by Dave Hassler, Jan. 2023, with the idea and ; essential structure shamelessly lifted from KB9. :^) ; ; 1) SAVE. From within VTL-2, in 'immediate' mode (no line number): ; A) type "=6048 ; B) type >=0 but DO NOT hit the key. ; C) Set up your recording device, press 'record' on that, ; then hit the key. ; D) When it's finished at $0000, hit the 'G' key, and you'll be ; returned to VTL-2 with the program still in memory. ; E) If you don't want to use Hypertape, change the JMP at the ; end of SAVE from $0100 to $1800; or, just store $18 in $17BF ; after this loads. ; ; 2) LOAD. From within VTL-2, type "=6080, then type >=0, hit , ; then start your cassette or other playback device. A successful ; load will put you back in the KIM monitor at location $0000. ; Just hit the 'G' key, and you'll be returned to VTL-2 with ; the loaded program ready to RUN with #=1. ; ; Why make the file ID '2C'? This is version 'C' of VTL-2, originally ; ported to the 6502 environment by Michael T. Berry, 2012-15, from the ; original Altair 680b version by Frank McCoy and Gary Shannon in 1977. ; ; A possible improvement could include passing a file ID number via ; the >=x command -- the suggested '0' is just a dummy variable. ; * = $0000 .BYTE $4C $CC $17 ; JMP to STORND after success * = $17A0 SAVE LDA #$00 ; get and store program start addr for save LDX #$03 STA $17F5 STX $17F6 LDA $CC ; get and store program end addr for save LDX $CD ; from the '&' variable STA $17F7 STX $17F8 LDA #$2C ; set file ID # and store STA $17F9 LDA #$00 ; clear all processor flags STA $F1 JMP $0100 ; jump to (DUMPT or) ... Hypertape! LOAD LDA #$2C ; set file ID and store STA $17F9 LDA #$00 ; clear all processor flags STA $F1 JMP $1873 ; jump to LOADT STORND LDA $17ED ; when returned, this will store the LDX $17EE ; loaded file's end addr. in the '&' STA $CC ; variable... STX $CD JMP $0FC1 ; ...and back to VTL-2 via warm start ; ****************************************** ; ; PAPERTAPE WITH HYPERTAPE AT $0100 FOLLOWS: ; ; ****************************************** ;0300004CCC170132 ;180100A9AD8DEC17203219A92785F5A9BF8D4317A264A9162061010A4A ;180118A92A208801ADF917207001ADF517206D01ADF617206D012008AA ;180130EC17206D0120EA19ADED17CDF717ADEE17EDF81790E9A92F0C88 ;180148208801ADE717207001ADE817207001A202A9042061014C5C07FE ;1801601886F14820880168C6F1D0F760204C19484A4A4A4A207D0109D2 ;18017868207D0160290FC90A18300269076930A00784F2A00284F3088B ;180190BEBE01482C471710FBB9BF018D4417A5F549808D421785F50B27 ;1801A8CAD0E968C6F3F00530074A90DBA000F0D7C6F210CF6002C30E69 ;0201C0037E0144 ;1817A0A900A2038DF5178EF617A5CCA6CD8DF7178EF817A92C8DF90DC8 ;1817B817A90085F14C0001A92C8DF917A90085F14C7318ADED17AE0B31 ;0A17D0EE1785CC86CD4CC10F0005B6 ;00000D000D