Trailing-Edge
-
PDP-10 Archives
-
decus_20tap4_198111
-
decus/20-0125/byte.lst
There is 1 other file named byte.lst in the archive. Click here to see a list.
BYTE - MANIPULATION ROUTINES MACRO %53A(1152) 11:37 1-Feb-81 Page 1
BYTE MAC 11-Mar-66 11:16
TITLE BYTE - MANIPULATION ROUTINES
ENTRY GFIELD,SFIELD
;
; THESE ROUTINES ARE FORTRAN-10 AND F40 COMPATIBLE
; REGISTER DEFINITIONS
;
000000 RESULT=0
000001 TEMP=1
000016 L=16
000017 P=17
000000' 000000 000000 BYTEP: EXP 0 ; BYTE POINTER
;
; GFIELD, CALLING SEQUENCE IS:
;
; IRESLT = GFIELD(IVAR, IPOS, ILEN)
;
; WHERE GFIELD IS AN INTEGER FUNCTION WHICH
; RETURNS A BYTE WITHIN IVAR DEFINED BY:
;
; IPOS - BYTE POSITION (NUMBER OF BITS FROM LEFT)
; ILEN - THE LENGTH OF THE BYTE IN BITS
;
000001' 334 00 0 00 000000 GFIELD: SKIPA ; F40 AND
000002' 261 17 0 00 000016 PUSH P,L ; FORTRAN-10 COMPATIBLE
000003' 264 00 0 00 000014' JSR POINT ; CREATE BYTE POINTER
000004' 135 00 0 00 000000' LDB RESULT,BYTEP ; GET THE BYTE
000005' 263 17 0 00 000000 POPJ P, ; RETURN TO FORTRAN
PAGE
BYTE - MANIPULATION ROUTINES MACRO %53A(1152) 11:37 1-Feb-81 Page 1-1
BYTE MAC 11-Mar-66 11:16
; SFIELD, CALLING SEQUENCE IS:
;
; CALL SFIELD(IVAR, IPOS, ILEN, IVAL)
;
; THIS STORES A BYTE (AS DEFINED IN GFIELD)
; WITH VALUE "IVAL"
;
000006' 334 00 0 00 000000 SFIELD: SKIPA ; F40 AND
000007' 261 17 0 00 000016 PUSH P,L ; FORTRAN-10 COMPATIBLE
000010' 264 00 0 00 000014' JSR POINT ; CREATE BYTE POINTER
000011' 200 01 1 16 000003 MOVE TEMP,@3(L) ; GET THE VALUE
000012' 137 01 0 00 000000' DPB TEMP,BYTEP ; STORE THE BYTE
000013' 263 17 0 00 000000 POPJ P, ; AND RETURN TO FORTRAN
PAGE
BYTE - MANIPULATION ROUTINES MACRO %53A(1152) 11:37 1-Feb-81 Page 1-2
BYTE MAC 11-Mar-66 11:16
; POINT, THIS ROUTINE CREATES THE BYTE POINTER
;
000014' 000000 000000 POINT: EXP 0 ; ENTRY POINT
000015' 201 01 0 00 000044 MOVEI TEMP,^D36 ; 36 BITS IN A WORD
000016' 274 01 1 16 000001 SUB TEMP,@1(L) ; MINUS THE POSITION
000017' 274 01 1 16 000002 SUB TEMP,@2(L) ; MINUS THE LENGTH
000020' 242 01 0 00 000036 LSH TEMP,^D30 ; SHIFT TO POSITION FIELD
000021' 202 01 0 00 000000' MOVEM TEMP,BYTEP ; AND STORE IN BYTEP
000022' 200 01 1 16 000002 MOVE TEMP,@2(L) ; GET THE LENGTH
000023' 242 01 0 00 000030 LSH TEMP,^D24 ; SHIFT TO SIZE FIELD
000024' 436 01 0 00 000000' IORM TEMP,BYTEP ; AND STORE IN BYTEP
000025' 200 01 0 16 000000 MOVE TEMP,0(L) ; GET ADDRESS FIELD
000026' 603 01 0 00 000020 TLNE TEMP,20 ; IF INDIRECT ADDRESSING (I.E. F10)
000027' 200 01 0 01 000000 MOVE TEMP,0(TEMP) ; THEN GET ADDRESS
000030' 550 01 0 00 000001 HRRZ TEMP,TEMP ; CLEAR LEFT HALF WORD
000031' 436 01 0 00 000000' IORM TEMP,BYTEP ; AND FORM THE BYTE POINTER
000032' 324 00 1 00 000014' JUMPA @POINT ; RETURN
END
NO ERRORS DETECTED
PROGRAM BREAK IS 000033
CPU TIME USED 00:00.199
17P CORE USED
BYTE - MANIPULATION ROUTINES MACRO %53A(1152) 11:37 1-Feb-81 Page S-1
BYTE MAC 11-Mar-66 11:16 SYMBOL TABLE
BYTEP 000000'
GFIELD 000001' ent
L 000016
P 000017
POINT 000014'
RESULT 000000
SFIELD 000006' ent
TEMP 000001