1
0
mirror of https://github.com/aap/pdp6.git synced 2026-01-25 19:57:33 +00:00

various changes

This commit is contained in:
aap
2016-10-21 15:09:01 +02:00
parent bdf5fad41d
commit c80dce6e90
35 changed files with 7362 additions and 39 deletions

42
code/tty.s Normal file
View File

@@ -0,0 +1,42 @@
TTY=120
AC0==0
AC1==1
AC2==2
PDP==17
INTERNAL PUTC,PUTS
PUTC:
CONSZ TTY,20 ; wait until not busy
JRST .-1
DATAO TTY,AC1 ; transfer character
; CAIE AC1,12 ; return unless LF
; POPJ PDP,
; MOVEI AC1,15 ; put CR and two DEL
; PUSHJ PDP,PUTC
; MOVEI AC1,177
; PUSHJ PDP,PUTC
; PUSHJ PDP,PUTC
POPJ PDP,
PUTS:
ILDB AC1,AC2
SKIPN AC1
POPJ PDP,
PUSHJ PDP,PUTC
JRST PUTS
INTERNAL GETCH,GETC
GETCH:
CONSO TTY,40 ; wait for flag
JRST .-1
DATAI TTY,AC1 ; get character
ANDI AC1,177
POPJ PDP,
GETC:
PUSHJ PDP,GETCH
PUSHJ PDP,PUTC
POPJ PDP,