1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 15:27:28 +00:00

BITPRT - print JSL as bits.

This commit is contained in:
Lars Brinkhoff 2017-01-30 13:58:02 +01:00 committed by Eric Swenson
parent e0b578a848
commit 1e821d5519
3 changed files with 90 additions and 0 deletions

View File

@ -108,6 +108,7 @@ A list of [known ITS machines](doc/machines.md).
- ATSIGN TARAKA, starts dragons.
- ATSIGN TCP, TCP support.
- BINPRT, display information about binary executable file.
- BITPRT, print JCL as bits.
- BYE, say goodbye to user. Used in LOGOUT scripts.
- CALPRT, decode a .CALL instructions CALL block.
- CHARFC/CHARFS, Chaos RFC.

View File

@ -709,6 +709,10 @@ respond "*" ":link info;complr 1,info;lispc >\r"
respond "*" ":midas sys3;ts binprt_sysen1;binprt\r"
expect ":KILL"
# bitprt
respond "*" ":midas sys3;ts bitprt_sysen2;bitprt\r"
expect ":KILL"
# inquir
respond "*" ":link lisp;subloa lsp,nilcom;subloa >\r"
respond "*" ":link sys;.fasl defs,lisp;.fasl defs\r"

85
src/sysen2/bitprt.19 Normal file
View File

@ -0,0 +1,85 @@
;-*-Midas-*-
TITLE BITPRT - Print JCL (or $Q) as x.y bits
A=1
B=2
C=3
D=4
E=5
T1=6
T2=7
TTYo==1
JClen==10
Define SYSCAL op,args
.Call [Setz ? Sixbit /op/ ? Args ((Setz))]
Termin
Jclbuf: Block Jclen
-1
Comma: 0
LH: 0
;;;
;;; Ahem
;;;
Begin: Syscal OPEN,[%Clbit,,.uao
%Climm,,TTYo
[Sixbit /TTY/]]
.Lose %LsFil
.Break 12,[..rJCL,,Jclbuf]
Skipn Jclbuf
Jrst GetQ
Move B,[440700,,Jclbuf]
gchar: Ildb C,B
Caie C,^C
Cain C,^M
Jrst Output
Caie C,",
Jrst NotC
Skipe Comma
Jrst gchar
Movem A,LH
Setz A,
Setom Comma
Jrst gchar
NotC: Cail C,"0
Caile C,"7
Jrst gchar
Subi C,"0
Lsh A,3
Add A,C
Jrst gchar
GetQ: .Suset [.rOption,,A]
Tlnn A,10000
Jrst Die ;Not called from DDT
.Value [Asciz "1/1QîP"]
Output: Skipe Comma
Hrl A,LH
Movei B,4
Move C,[Setz] ;Bit 4.9
iLoop: Movei D,9.
Move E,B
Addi E,60
Loop: Tdnn A,C
Jrst Next
.Iot TTYo,E
.Iot TTYo,[".]
Move T2,D
Addi T2,60
.Iot TTYo,T2
.Iot TTYo,[" ]
Next: Lsh C,-1
Sojn D,Loop
Sojn B,iLoop
Die: .Break 16,44000
END BEGIN