1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-15 20:36:13 +00:00
Files
PDP-10.its/src/lspsrc/ldbhlp.1
2016-12-23 07:23:28 -08:00

62 lines
1.5 KiB
Common Lisp
Executable File

;;; LDBHLP -*-LISP-*-
;;; **************************************************************
;;; ***** MACLISP ******* BYTE-manipulation Helpers **************
;;; **************************************************************
;;; ** (C) COPYRIGHT 1980 MASSACHUSETTS INSTITUTE OF TECHNOLOGY **
;;; ****** THIS IS A READ-ONLY FILE! (ALL WRITES RESERVED) *******
;;; **************************************************************
(herald LDBHLP /1)
(lap-a-list
'((lap *LOAD-BYTE subr)
(args *LOAD-BYTE (() . 3)) ;Args = (word position size)
(push p (% 0 0 fix1))
(move d 0 c)
(rot d -6)
(hrr d 0 b)
(rot d -6)
(move tt 0 a)
(jrst 0 LD)
(entry *LDB subr)
(args *LDB (() . 2)) ;Args = ( position_30.+size_24. word )
(push p (% 0 0 fix1))
(move d 0 a)
(move tt 0 b)
LD (hrri d tt)
(ldb tt d)
(popj p)
(entry *DEPOSIT-BYTE subr)
(args *DEPOSIT-BYTE (() . 4)) ;Args = (word position size byte)
(push p (% 0 0 fix1))
(move r 0 4)
(move d 0 c)
(rot d -6)
(hrr d 0 b)
(rot d -6)
(move tt 0 a)
(jrst 0 DP)
(entry *DPB subr)
(args *DPB (() . 3)) ;Args = ( newbyte position_30.+size_24. word )
(push p (% 0 0 fix1))
(move r 0 a)
(move d 0 b)
(move tt 0 c)
DP (hrri d tt)
(dpb r d) ;puts result in TT
(popj p)
(entry ASH subr)
(args ASH (() . 2))
(push p cfix1)
(jsp t fxnv1)
(jsp t fxnv2)
(ash tt 0 d)
(popj p)
() ))
(or (get 'ASH 'macro) ;foofoofoo!
(macro ASH (x) `(LSH ,.(cdr x))))