1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-17 16:53:23 +00:00
PDP-10.its/src/mudsys/pxcore.9
Adam Sampson a81db26a7a Rename to ITS conventions.
MIDAS and Muddle source get version numbers (as in the 1973 Muddle
source); the build files don't.
2018-04-25 09:32:25 +01:00

77 lines
1.1 KiB
Groff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

TITLE .CORE
RELOCATABLE
.INSRT MUDDLE >
.GLOBAL P.CORE,P.TOP,PHIBOT,PURBOT,FRETOP,SQKIL,GCFLG,KILBUF
; .CORE AND .SUSET [.RMEMT,,---] FOR PAGED ENVIRONMENT
P.CORE: PUSH P,0
PUSH P,A
PUSH P,B
PUSH P,C
PUSH P,D
PUSH P,E
SKIPN GCFLG
PUSHJ P,SQKIL
MOVE A,-4(P)
ASH A,10. ; CHECK IT
CAMLE A,PURBOT ; A CAML HERE IS OBSERVED TO LOSE
FATAL BAD ARG TO GET CORE
MOVE A,-4(P) ; RESTORE A
HRRZ B,P.TOP ; GET FIRST ADDRESS ABOVE TOP
ASH B,-10. ; TO BLOCKS
CAIG A,(B) ; SKIP IF GROWING
JRST P.COR1
SUBM B,A ; A/ -NUMBER OF BLOCKS TO GET
HRLI B,(A) ; AOBJN TO BLOCKS
.CALL P.CORU ; TRY
JRST POPBJ ; LOSE
MOVE A,B
P.COR2: ASH B,10. ; TO WORDS
MOVEM B,P.TOP ; NEW TOP
POPBJ1: AOS -6(P) ; SKIP RETURN ON SUCCESS
POPBJ: POP P,E
POP P,D
POP P,C
POP P,B
POP P,A
POP P,0
POPJ P,
; HERE TO CORE DOWN
P.COR1: SUBM A,B
JUMPE B,POPBJ1 ; SUCCESS, YOU ALREADY HAVE WHAT YOU WANT
HRLI A,(B)
MOVEI B,(A)
.CALL P.CORD
JRST POPBJ
JRST P.COR2
P.CORU: SETZ
SIXBIT /CORBLK/
1000,,100000
1000,,-1
B
401000,,400001
P.CORD: SETZ
SIXBIT /CORBLK/
1000,,0
1000,,-1
SETZ A
IMPURE
P.TOP==FRETOP
PURE
END