Trailing-Edge
-
PDP-10 Archives
-
BB-J845A-SM
-
source/dmpbot.p11
There are no other files named dmpbot.p11 in the archive.
;<WEISBACH>DMPBOT.P.1, 25-Feb-79 18:25:59, EDIT BY WEISBACH
;
; MOP MODE FUNCTION CODE DEFINITIONS
;
M.PRMD=4. ;REQUEST MEMORY DUMP
M.PEMM=6. ;ENTER MOP MODE
M.PMMR=12. ;MOP MODE RUNNING
M.PMDP=14. ;MEMORY DUMP DATA
.MACRO RETURN
RTS PC
.ENDM
.=6
START:
MOV #PDL,SP
CLR R0 ;START AT ZERO
MOV #10$,@#4 ;HAVE NXM'S COME HERE
6$: TST (R0) ;CHECK IF LOCATION EXISTS
ADD #2,R0 ;NEXT ADDRESS TO CHECK
CMP R0,#160000 ;MAXIMUM
BNE 6$ ;CONTINUE CHECKING
10$: MOV R0,MMRSIZ ;STORE MEMORY SIZE IN MMR MSG
INITIT: MOV #PDL,SP ;INIT THE STACK
JSR PC,INIDRV ;INIT THE DMC
MOV #MMR,-(SP) ;MOP-MODE-RUNNING MSG
MOV #MMRLNG,R2 ;LENGTH OF SAME
JSR PC,SNDDRV ;SEND IT OUT
BNE INITIT ;FAILED, START OVER
TST (SP)+ ;POP OFF ADDRESS
MOPRCV:
MOV #RCVMSG,-(SP) ;RECEIVE BUFFER
MOV #RCVLNG,R2 ;RECIEVE BUFFER LENGTH
JSR PC,RCVDRV ;GO RECIEVE A MSG
BNE INITIT ;FAILED,START OVER
TST (SP)+ ;POP OFF ADDRESS
CMPB #7,R2 ;BETTER BE 7 BYTES
BNE BOOTIT ;NOT SO
CMPB #M.PRMD,RCVFCN ;PROGRAM DUMP REQUEST?
BNE INITIT ;NO
MOV RCVCNT,R0 ;REQUESTED DUMP COUNT
MOV R0,XMTCNT ;REMEMBER IT
ADD #5,XMTCNT ;ADD FOR MOP OVERHEAD BYTES
MOV RCVADR,R3 ;WHERE TO START DUMPING
MOV R3,XMTADR ;PUT IN DUMP DATA MSG
MOV #DATA,R2 ;WHERE TO MOVE THE DUMP DATA
20$: MOVB (R3)+,(R2)+ ;MOVE TO MSG
DEC R0 ;DECREMENT COUNT
BNE 20$ ;DO UNTIL DONE
MOV XMTCNT,R2 ;COUNT FOR DMC DRIVER
MOV #XMTMSG,-(SP) ;
JSR PC,SNDDRV ;GO SEND IT
BNE INITIT ;FAILED , RESTART
TST (SP)+ ;POP OFF ADDRESS
BR MOPRCV ;LOOP
BOOTIT: CMPB #M.PEMM,RCVFCN ;ENTER MOP MODE?
BNE INITIT ;NO
JMP @#REBOOT ;TRIGGER ROM