job punch core in loadable form - punch punch area ctl 6611 * org 1 sw a1,a2 a1 sw a3,a4 a2 cw a3 sw a5,a6 a4 b a5 org b3 a5 sw a7,a8 a6 sw a9,adone a7 sw apunch,aread a8 b a9 org cdone a9 sw bkbl adone nop apunch p aread r bloop dcw #1 job punch word marks in punch area as ones * org 1 bloop mcw bread,101 b1 bw bwm,101 b2 mcw bkbl,101 bwm bce bdone,bloop+5,8 b3 a bread,bloop+6 b4 a bread,b1+6 a bread,b2+6 b bloop org edone bdone nop p bread r cstart bkbl dcw #1 job Move a skeleton load card to the punch area * org 1 cload lca 020,100 org b3 cstart lca cread+3,171 lca csw+6,160 lca csw+6,153 lca cload+6,146 cdone sw 101 nop nop r dstart csw sw 40,40 cread r 40 job Move the index area -- 81-100 -- to the punch area * org 1 dstart mcw 81,101 bce ddone,dstart+2,0 Up to 100 yet? a dread+3,dstart+6 bw dstart,81 mcw dclear+6,153 emit cw for 81 if no wm in 81 b dstart org a9 ddone sw e1 cw p punch the card with lca (and maybe cw) dread r estart dclear cw 81,81 job Put wm addrs for index area at 144-146 * org 1 estart mcw enop+6,146 Change load at 40 to nop etestw bw esetwm,82 eloop bce eread,etestw+5,0 Up to 100 yet? e1 a eread,etestw+6 b etestw dc #10 esetwm mcw etestw+6,143 Store address of wm mcw 154,140 Change load at 40 to sw epunch p eloop edone nop nop eread r fstart enop nop 82,40 job Move a skeleton load card to the punch area * org 1 fload lca 030,210 org b3 fstart cs *+1,139 sw 101,101 lca fsw+6,153 lca fload+6,146 cw h1 sw nop r gstart fsw sw 40,40 job Move the 181-210 area to the punch area * org 1 gstart mcw 181,101 bce gdone,gstart+2,1 Up to 210 yet? a gread+3,gstart+6 g1 bw gstart,181 mcw gclear+6,153 emit cw for 81 if no wm in 81 b gstart org a9 gdone sw h1 cw p punch the card with lca (and maybe cw) gread r hstart gclear cw 181,181 job Put word mark addresses into load card at 44-46 * org 1 hstart mcw hnop+6,146 Change load at 40 to set nop htestw bw hsetwm,82 hloop bce hread,htestw+5,1 Up to 210 yet? h1 a hread,htestw+6 a hread,hnop+3 b htestw dc #3 hsetwm mcw htestw+6,143 Store address of wm mcw 154,140 Change load at 40 to sw hpunch p hloop hdone nop nop hread r istart hnop nop 182,40 job clear the read area, bootstrap org cstart istart lca isw+3,84 lca iread+3,88 sw 89,89 cs 81,80 isw sw 1 dcw #1 dcw #1 iread r 1 job dump the rest org 87 x1 dc #3 Used for core address dc #2 x2 dc #3 Used for card address dc #2 x3 dc #3 Used for place to store word mark org 333 rstart cs 180 cs sbr rtop sbr x1,211 Start dump at 211 sw x1-2,x2-2 * Set up for a new card rnewcd sw 101 mcw rcard,171 sbr x2,1 Start card at column 1 sbr x3,150 First wm address at column 50 b rloop * Skip areas that are blank with no word marks rskip c x1,rtop Q. Done with all memory? be rdone Yes sbr x1,1+x1 Bump memory address rloop bw rstore,0+x1 Word mark? bce rskip,0+x1, Skip if blank and no wm rnowm mcw x1,153 Non-blank with no WM -- create a mcw rclrwm+3 clear word mark instruction sbr x3,157 update set-word-mark address rwm bw rwm2,0+x1 Q. Need to emit a "set word mark"? * Store core data into the card area rstore mcw 0+x1,100+x2 Put the character into the card mcw x1,146 Core address to LCA in 40-46 mcw x2 Card address to LCA in 40-46 c x1,rtop Q. Are we done? be rpdone Yes, punch the card and quit sbr x1,1+x1 Bump core address sbr x2,1+x2 Bump card address bce rpunch,100+x2,L Q. Is the data area full? b rwm Go around again * Emit a set word mark instruction rwm2 bce rpunch,x3-1,7 Q. Word mark area full (x3=171)? mcw x1,0+x3 Store core address in sw instruction sbr x3,3+x3 Bump the word mark address bce rstore,15994+x3,, Q. Was it the first wm in sw inst? sbr x3,1+x3 No, bump one more b rstore Go check if we are done * Punch the card rpunch p cs rnewcd,180 * All done rpdone p Punch rdone sw 40,47 r 40 Load the next overlay rclrwm cw 039 rtop dcw #3 rcard dcw @L000000,040040,040040,0400401040@ ex rstart job Postprocess the first two cards punched org 333 pstart cs 180 r Data from 101-180 mcw 80,area+79 r Word marks from 101-180 sbr x1,1 * Set word marks in area corresponding to 1s in the card area psetwm bce pnoset,0+x1, Q. Don't need a word mark? sw area-1+x1 pnoset bce pdump,x1-1,8 Q. done? sbr x1,1+x1 b psetwm pdump sbr ptop,180 sbr x1,101 Start dump at data from 101 * Set up for a new card pnewcd sw 101 mcw pcard,171 sbr x2,1 Start card at column 1 sbr x3,150 First wm address at column 50 b ploop * Skip areas that are blank with no word marks pskip c x1,ptop Q. Done with all memory? be pdone Yes sbr x1,1+x1 Bump memory address ploop bw pstore,area-101+x1 Q. Word mark? bce pskip,area-101+x1, Skip if blank and no wm pnowm mcw x1,153 Non-blank with no WM -- create a mcw pclrwm+3 clear word mark instruction sbr x3,157 update set-word-mark address pwm bw pwm2,area-101+x1 Q. Need a "set word mark"? * Store core data into the card area pstore mcw area-101+x1,100+x2 Put the character mcw x1,146 Core address to LCA in 40-46 mcw x2 Card address to LCA in 40-46 c x1,ptop Q. Are we done? be ppdone Yes, punch the card and quit sbr x1,1+x1 Bump core address sbr x2,1+x2 Bump card address bce ppunch,100+x2,L Q. Is the data area full? b pwm Go around again * Emit a set word mark instruction pwm2 bce ppunch,x3-1,7 Q. Word mark area full (x3=171)? mcw x1,0+x3 Store core address in sw instruction sbr x3,3+x3 Bump the word mark address bce pstore,15994+x3,, Q. Was it the first wm in sw inst? sbr x3,1+x3 No, bump one more b pstore Go check if we are done * Punch the card ppunch p cs pnewcd,180 * All done ppdone p Punch pdone nop 333 Set addr regs for halt h Halt b pdone Stay halted pclrwm cw 039 ptop dcw #3 pcard dcw @L000000,040040,040040,0400401040@ area da 1x80,c Area for the data in 101-180 job Trial balloon org 1 tloop1 mcw 1+x1,101+x2 Move core data to punch area bw twm,1+x1 Need a WM? mcw tclear,147 No, move a cw op to 147 twm sbr 150,1+x1 and the core addr tloop2 sbr 146,1+x1 core addr to 146 sbr x1 bump core addr sbr 143,1+x2 card addr to 143 sbr x2 bump card addr bce tdone,x1-2,7 Done up to 699? bce tpunch,x2-1,3 punch if up to cc 30 bw tpunch,1+x1 punch if a word mark mcw 1+x1,101+x2 move core data to card area b tcont org 181 tcont b tloop2 tpunch p tmcw mcw tmcw,147 turn of cw if there is one sbr x2,0 b tloop1 tdone p r 1 tclear cw job symbol table end pstart