; AFX137.M68 AlphaFIX patches for AMOS/L 1.3, AlphaFIX version 1.2(137) ; by Irv Bromberg, Medic/OS Consultants, Toronto, Canada ; last modified 16-Apr-87 to use J.DEC bit externally defined in MAC:SYS.UNV copy patch search trm ohash 154,072,415,551 nhash 775,565,451,475 over 1,2,0,137.,0 nver 1,2,0,137.,9. if eq,1 Patches installed: 1. clean up command mode registers display (faster for modems) 2. Debugging {RES:}{MEM:}filespec {with SYM} 3. " AlphaFIX/L" --> "AlphaFIX/L" 4. preserve JOBEXI(JCB) so we can call FIX from SHELL.LIT, AMOS.SBR, etc. 5. preserve J.DEC bit of JOBTYP(JCB) 6. show octal/decimal/hex mode 7. fix cursor address bug which ruined registers display after MOVx command 8. fix up-arrow in disassembly mode to use TCRT call for cursor up rather than simply TTY the ^K which is already in D1 (^K does not move cursor up on all terminal types, eg. Hewlett Packard, Cybernex, ANSI terminals do not). 9. allow execution of Floating point operations as a single step endc .=474 ; We must preserve JOBEXI(JCB) else FIX will do a hard exit to monitor ; level instead of returning control to any calling program (such as ; SHELL.LIT or AMOS.SBR). call EXsave ; save JOBEXI(JCB) .=514 andw #,D7 ; preserve J.DEC too .=1146 call EXrest ; restore JOBEXI(JCB) rather than clearing it .=1156 andw #^C,D7 ; restore J.DEC too .=2000 andw #,D7 ; test if not octal bne 2024 .=2024 call ShowMode ; show decimal or hex br 2040 ; skip old "hex" .=2074 call RESMEM ; show {RES:}or{MEM:} if appropriate before filespec nop ; clear the PFILE instruction we clobbered .=2252 ; was TYPESP < AlphaFIX/L > -- the leading space is wierd TTYI ASCIZ "AlphaFIX/L " EVEN .=2634 ; skip the following because too slow when using modem br 2660 ; skip "Registers:" .=2670 br 2714 ; skip cursor return and twelve cursor rights .=10710 ; fix cursor address bug which ruined registers display after ; a MOVx command -- move to new row 7 instead of old row 9 movw #7,D1 ; was MOV #9.,D1 .=14250 ; fix cursor up in dissassembly mode to use TCRT call not TTY CALL CursUp TCRT ; replace TTY with TCRT monitor call .=14734 ; jump to patch to execute Floating operations as single step JMP FLTPCH .=14742 NOTFLT: ; jump back here if not a Floating operation .=36254 ; original PRGEND CursUp: DEC 2012(A0) ; replace instruction we clobbered MOVW #^H0FF03,D1 ; this is a cursor up TCRT code RTN ; TCRT executed upon return ShowMode:ANDW #J.DEC,D7 ; are we in DECIMAL mode? BEQ Hex ; no, show "hex" TYPE ; yes, show "decimal" MOVB #10.,1240(A0) ; force base 10 for expression evaluations RTN Hex: TYPE RTN ; This patch saves & restores JOBEXI(JCB) so that FIX can be called by ; SHELL.LIT or AMOS.SBR with control returning to the calling program ; upon QUIT instead of hard exit to monitor level: EXsave: CLR 140(A6) ; do the instruction that we clobbered LEA A1,SAVEXI ; with the patch's call, save the MOV JOBEXI(A6),@A1 ; JOBEXI stack pointer RTN EXrest: CLR JOBBPT(A6) ; clear breakpoint instead of JOBEXI! LEA A1,SAVEXI MOV @A1,JOBEXI(A6) ; restore the JOBEXI RTN SAVEXI: BLKL 1 ; save JOBEXI here RESMEM: ; This patch alerts the operator that the module he is debugging ; is in SYSTEM memory or his memory partition. MOV 364(A0),A6 ; get PRGBAS CMP A6,MEMBAS ; is module in SYSTEM memory? BHI 10$ TYPE ; yes, show RES: BR 20$ 10$: TSTW -10(A6) ; any module flag bits set? BEQ 20$ ; no, not loaded/permanent/data TYPE ; yes, show MEM: 20$: PFILE 214(A0) ; replace the PFILE instruction we clobbered RTN FLTPCH: ; Patch to allow floating point operations to take place in one step CMPW D7,#47100 JNE NotFLT MOV A6,204(A0) MOVW (A6),210(A0) MOVW #47161,(A6) MOVW -2(A6),A5 SUBW #<47100-40>,A5 ORW #32768.,74(SP) MOV A6,76(SP) MOV 2064(A0),A6 MOVW 2070(A0),D1 ANDW #31.,D1 ANDW #-32.,(A6) ORW D1,(A6) ADD A5,A5 MOV 0(A5)[A5],A6 REST A0-A5,D0-D7 MOV (SP),-(SP) MOV A6,4(SP) POP A6 RTN END .