-* BINARY PUNCH AND LOAD PROGRAM
+* BINAL - BINARY PUNCH AND LOAD PROGRAM (REV. 1.0)
*
*
-* LOAD
-* FIRST LOC TO A, LAST LOC TO B
-* RUN IT.
+*
+*
+* BINAL - A PAL-AP DROP-IN REPLACEMENT.
+*
+*
+*
+* AUTHOR
+* PHILIPP HACHTMANN
+*
+*
+* VERSION
+* 1.0 (24.04.2006) - INITIAL VERSION
+*
+*
+*
+* STORAGE REQUIREMENT
+* ONE SEGMENT
+*
+*
+* FEATURES:
+* NO 4/6/6 FORMAT, DIRECT BINARY DATA
+* BLOCK CHECKSUMS
+* LOAD AND GO CAPABLE
+* SUPPORTS ONLY HIGH SPEED PAPER TAPE PUNCH
+*
+*
+* USAGE
+* FIRST LOAD THE OBJECT TAPE INTO ANY SECTOR 'XX000 IN MEMORY.
+* TO PUNCH A SELF LOADING TAPE DO THE FOLLOWING:
+* -PRESS MSTCLR
+* -SET P TO 'XX000
+* -IF LOAD AND GO IS DESIRED, PUT PROGRAM'S START ADDRESS INTO A
+* -PRESS START
+* -ENTER THE FIRST ADDRESS TO BE PUNCHED INTO A
+* -PRESS START
+* -ENTER THE LAST ADDRESS TO BE PUNCHED INTO A
+* -PRESS START, BINAL PUNCHES YOUR SYSTEM TAPE
+*
+* TO MAKE A BINAL SLST TAPE
+* USE 'XX000 THAT AS FIRST LOCATION TO BE PUNCHED.
+* THE LAST LOCATION TO BE PUNCHED IS 'XX577, THE REST OF THE SECTOR IS
+* ALWAYS AND AUTOMATICALLY PUNCHED OUT.
+*
+* LOADING SLST TAPES
+* SIMPLY MOUNT THE GENERATED TAPE ON THE HIGH SPEED PAPER TAPE READER
+* AND LOAD WITH THE STANDARD KEY-IN LOADER.
+* THE CONTENTS OF THE TAPE GO TO WHERE THEY COME FROM. THE THIRD STAGE
+* LOADER GOES TO 'XX600. THIS LOCATION CAN BE ALTERED BY ENTERING AN
+* ADDRESS INTO A BEFORE STARTING THE KEY-IN LOADER.
+* IT IS ALSO POSSIBLE TO ALTER THE THIRD-STAGE LOADER ADDRESS BEFORE
+* PUNCHING BY DEPOSITING ANOTHER ADDRESS INTO 'XX600.
+*
+* SPECIAL MODES OF OPERATION
+* IT IS POSSIBLE TO COLLECT THE OUTPUT OF MULTIPLE RUNS OF BINAL INTO
+* ONE SYSTEM TAPE. THIS IS DONE BY SENSE SWITCH SETTINGS:
+* SSW1 SET - DON'T PUNCH OUT SECOND AND THIRD STAGE LOADERS
+* SSW2 SET - DON'T PUNCH OUT DATA
+* SSW3 SET - DON'T PUNCH OUT END OF TAPE/GO BLOCK
+* SSW4 SET - PUNCH ONLY A GO BLOCK
*
* TAPE FORMAT:
-* THE TAPE CONTAINS DATA BLOCKS.
+* THE TAPE CONTAINS HIGE DATA BLOCKS.
* EVERY BLOCK IS PREPENDED WITH THE BLOCK START CHARACTER
* AND THE BLOCK TYPE BYTE.
* THEN FOLLOWS THE BLOCK DATA IN 16BIT BIG ENDIAN FORMAT.
*
************************************************************************
*
- SUBR LSTART,BO3S LOADER START IS GOOD TO KNOW
+ SUBR LSTART,BO3S BEGINNING OF THIRD STAGE LOADER
*
REL RELOCATABLE MODE
ORG 0
*
- STA STRT SAVE AUTO-START ADDRESS
+ STA STRT SAVE AUTO START LOCATION
HLT
STA ALOC FIRST LOCATION TO PUNCH
HLT
STA ELOC LAST LOCATION TO PUNCH
*
OCP '0002 START PUNCH (NOT NECESSARY ON MY H316)
+*
+ SR1 SKIP IF SSW 1 RESET
+ JMP NOBO NO BOOT CODE
JST PLDR PUNCH OUT LEADER
JST PS2 PUNCH SECOND STAGE LOADER
JST PS3 PUNCH THIRD STAGE LOADER
+*
+NOBO SS2 SKIP IF SSW 2 SET
JST PDAT PUNCH OUT DATA
-*
- LDA STRT
+*
+ LDA STRT START ADDRESS
+ SZE SET?
+ JST ABLK MAKE ADRESS-BLOCK
+*
+ SR3 SKIP IF SSW3 RESET
+ JMP NOGO NO GO/STOP BLOCK
+*
+ LDA STRT
SZE
- JMP AUTO
+ JST GBLK MAKE GO BLOCK
+ LDA STRT
+ SNZ
JST SBLK MAKE STOP BLOCK
- JMP EOT
-AUTO JST ABLK MAKE ADRESS-BLOCK
- JST GBLK MAKE GO-BLOCK
-EOT JST PLDR END OF JOB HAS COME.
+*
+NOGO JST PLDR END OF TAPE HAS COME.
HLT
JMP *-1 NO ESCAPE
*
+*
**********************
* PUNCH THE DESIRED DATA
PDAT DAC **
LOOP CRA MAIN LOOP
LDA ELOC
SUB ALOC
- AOA
- STA AVAL DETERMINED AVAILABLE DATA
+ AOA ONE IS MINIMUM
+ STA AVAL AVAILABLE NUMBER OF WORDS
SNZ
JMP* PDAT END OF DATA, WE ARE HAPPY, RETURN
*
-* FIRST TRY TO ESABLISH A ZERO BLOCK
+* TRY TO MAKE A ZERO BLOCK
LDA ALOC
JST CZER COUNT ZERO LOCATIONS - IF ANY
CAS ZMIN COMPARE WITH MINIMUM FOR ZERO BLOCK