;debugging stuff for TDOS ;-------------- "block# TREAD - reads disk block into hpiplos block 0" $PRINT CRLF OCTAL DEFINE TREAD #0 SWAP SBLA @BLK GET R-1K END ;-------------- "block# TWRITE - writes hpiplos block 0 to disk block" $PRINT CRLF OCTAL DEFINE TWRITE #0 SWAP SBLA @BLK GET W-1K END ;-------------- "from to block# TDUMP - displays disk block contents" $PRINT CRLF OCTAL DEFINE TDUMP TREAD SWAP @BLK GET ADD SWAP @BLK GET ADD DUMP END ;-------------- "file# TMKFILE - enter and save text file" $PRINT CRLF OCTAL DEFINE TMKFILE ZAM ;zero alt memory MS_SAVE 2 MSUSER ;redirect MS in/out to alt memory (only using out) DO ;until empty string entered $IN ;get string $LEN ;push length DUP IFNZ MS$OUT MSCRLF ENDIF ;if not empty write line to alt mem WHILE ;string not empty #0 MSBOUT ;output a nul to terminate file AM2F ;write alt mem to file MS_RESTORE ;restore MS assignments END ;-------------- "ALTLOAD - restores an ALTSAVE and swaps" $PRINT CRLF ; uses location 176 OCTAL DEFINE ALTLOAD 77000 GET 105734 SUB IFZ ;if 105734 is in location 77000 2 176 #1 A>CCOPY ; check alt mem loc 2 176 GET 124003 SUB IFZ ; if it contains jmp 3,i 77000 RUN ; then do it ELSE "Alt mem not a system file. " $PRINT ENDIF ELSE "ALTSAVE has not been run. " $PRINT ENDIF END ;-------------- CONSOLE