Trailing-Edge
-
PDP-10 Archives
-
BB-H138C-BM
-
5-sources/makdmp.mac
There are 20 other files named makdmp.mac in the archive. Click here to see a list.
;<5.UTILITIES>MAKDMP.MAC.5, 28-Oct-81 15:19:02, EDIT BY GRANT
;Create entry vector
; UPD ID= 1691, SNARK:<5.UTILITIES>MAKDMP.MAC.4, 12-Mar-81 11:54:00 by GRANT
;Update Copyright
;<GRANT>MAKDMP.MAC.48, 12-Feb-81 09:20:25, EDIT BY GRANT
;COMNDization
;<4.UTILITIES>MAKDMP.MAC.3, 3-Jan-80 15:26:00, EDIT BY R.ACE
;UPDATE COPYRIGHT DATE
;<4.UTILITIES>MAKDMP.MAC.2, 10-Mar-79 14:10:02, Edit by KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;THIS IS A PROGRAM TO CREATE A TOPS-20 DUMP FILE
TITLE MAKDMP
SEARCH MONSYM,MACSYM,CMD
.REQUIRE SYS:MACREL,SYS:CMD
SALL
T1==1
T2==2
T3==3
DEST==5
P==17
PDLLEN==100 ;LENGTH OF STACK
PDL: BLOCK PDLLEN ;THE STACK
FILJFN: 0 ;FILE'S JFN
FILSIZ: 0 ;FILE'S SIZE
DEFDEV: ASCIZ/MAKDMP/ ;DEFAULT DEVICE
DEFDIR: ASCIZ/SYSTEM/ ;DEFAULT DIRECTORY
DEFNAM: ASCIZ/DUMP/ ;DEFAULT NAME
DEFEXT: ASCIZ/EXE/ ;DEFAULT EXTENSION
EXEDIR: 1776,,1
1777,,1
SRCPAG==10 ;PAGE TO MAP FROM
PRGVER==5 ;VERSION
PRGEDT==2 ;EDIT
PRGMIN==0 ;MINOR VERSION
PRGCST==0 ;CUSTOMER ID
ENTVEC: JRST START ;MAIN ENTRY
JRST START ;REENTER POINT
PRGVER_^D24+PRGMIN_^D18+PRGEDT+PRGCST_^D33
START: RESET
MOVEI P,PDL-1 ;SET UP STACK
CALL CMDINI ;INIT COMND STUFF
COMAND: PROMPT (MAKDMP>) ;THE PROMPT
MOVEI T1,[FLDDB. .CMKEY,,CMDLST] ;GET A KEYWORD
CALL RFIELD ;...
MOVE T1,(T2) ;GET THE DISPATCH
CALL (T1) ;GO DO IT
JRST COMAND ;NEXT COMMAND
CMDLST: CMD,,CMD
T CREATE
T EXIT
T HELP
CMD==.-CMDLST-1
CMDSTG
.CREAT: NOISE (Dump File)
SETZM CJFNBK ;INIT
HRLI T1,CJFNBK ; THE
HRRI T1,CJFNBK+1 ; GTJFN
BLT T1,CJFNBK+CJFNLN-1 ; BLOCK
MOVE T1,[POINT 7,DEFDEV]
MOVEM T1,CJFNBK+.GJDEV
MOVE T1,[POINT 7,DEFDIR] ;PUT IN THE DEFAULTS
MOVEM T1,CJFNBK+.GJDIR
MOVE T1,[POINT 7,DEFNAM]
MOVEM T1,CJFNBK+.GJNAM
MOVE T1,[POINT 7,DEFEXT]
MOVEM T1,CJFNBK+.GJEXT
MOVEI T1,[FLDDB. .CMFIL,CM%SDH,,<filespec>] ;PARSE A FILESPEC
CALL RFIELD ;....
MOVEM T2,FILJFN ;SAVE THE JFN
MOVS DEST,T2 ;GET READY FOR PMAP
NOISE (for Memory Size)
MOVEI T1,[FLDDB. .CMNUM,CM%SDH,12,<number - K words>] ;PARSE A NUMBER
CALL CFIELD ;...
MOVEM T2,FILSIZ ;SAVE THE FILE SIZE
MOVE T1,FILJFN ;RETRIEVE THE JFN
MOVE T2,[<FLD(44,OF%BSZ)>+OF%WR] ;36-BIT BYTES, WRITE
OPENF ;OPEN THE FILE
ERJMP [JSERR ;SOMETHING WRONG
JRST DONE] ;QUIT
DMOVE T1,EXEDIR ;GET DEFAULT EXE DIR
DMOVEM T1,SRCPAG*1000 ;INTO THE PAGE
MOVE T2,FILSIZ ;RETRIEVE FILE SIZE
MAPIT0: LSH T2,1 ;MAKE IT A PAGE COUNT
ADDI T2,1 ;ALLOW ONE PAGE FOR DIRECTORY
MOVEM T2,FILSIZ ;SAVE NUMBER
MAPIT: MOVE T1,[.FHSLF,,SRCPAG] ;MAP FROM US
MOVE T2,DEST ; TO FILE
MOVX T3,PM%RWX ;READ, WRITE
SETZM SRCPAG*1000+777 ;CREATE THE PAGE
PMAP ;MAP IT
ERJMP [JSERR ;SOMETHING WRONG
MOVE T1,FILJFN ;GET BACK THE JFN
CLOSF ;CLOSE IT
JFCL ;OH, WELL
JRST DONE] ;QUIT
ADDI DEST,1 ;INCR PAGE NUMBER
MOVEI T1,0(DEST) ;GET CURRENT PAGE NUMBER
CAMGE T1,FILSIZ ;GOT IT ALL YET?
JRST MAPIT ;NO. GO ON
MOVE T1,FILJFN ;GET BACK THE JFN
TXO T1,CO%NRJ ;DON'T RELEASE JFN
CLOSF ;CLOSE THE FILE
ERJMP [JSERR
JRST DONE] ;QUIT
HRLI T1,.FBSIZ ;THE FILE'S SIZE
SETO T2,
MOVE T3,FILSIZ ;GET PAGE COUNT
IMULI T3,^D512 ;COMPUTE WORDS IN THE FILE
CHFDB
HRLI T1,.FBBYV
MOVX T2,FB%BSZ
MOVX T3,<FLD(44,FB%BSZ)>
CHFDB
HRLI T1,.FBCTL ;CHANGE FLAG WORD
MOVX T2,FB%NOD
MOVX T3,FB%NOD ;SET TO "NO DUMP"
CHFDB
DONE: MOVE T1,FILJFN ;GET BACK THE JFN
RLJFN
JSERR
RET
.EXIT: NOISE (to TOPS-20 Command Level)
CONFRM
HALTF
RET ;IS CONTINUABLE
.HELP: NOISE (for MAKDMP)
CONFRM
MOVE T1,[POINT 7,HLPTXT]
PSOUT
ERJMP [JSERR
RET]
RET
HLPTXT: ASCIZ/
MAKDMP creates a dump file for TOPS-20 monitor crashes.
In the filespec you must supply the structure name. The remainder
of the fields will be defaulted if you do not choose to enter anything.
To indicate the amount of memory you have, use the following information:
Physcial Memory K Words
.5 megaword 512
1 megaword 1024
1.5 megaword 1536
2 megaword 2048
etc.
/
END <3,,ENTVEC> ;ESTABLISH THE ENTRY VECTOR