home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / computers / pdp10 / info < prev    next >
Text File  |  1995-08-09  |  1KB  |  38 lines

  1. On the PDP-10:
  2.   A page is 512 words, numbered from 000 to 777 octal.
  3.   A word is 36 bits, numbered 0 to 35, left to right.  (Bit 0 is the sign
  4.     bit, bit 35 is the least significant bit)
  5.   The page is 512 * 36 = 18432 bits = 4608 nybbles = 2304 octets.
  6.  
  7. OUTPAG:    MOVE    T1,[POINT 4,IBUF]    ; Read data 4 bits at a time
  8.     MOVEM    T1,IPTR
  9.     MOVE    T1,[POINT 8,OBUF]    ; Write data 8 bits at a time
  10.     MOVEM    T1,OPTR
  11.     MOVEI    T3,^D<512*36/8>        ; Number of octets per page
  12. OUTPG1:    ILDB    T1,IPTR            ; Even numbered nybble
  13.     ILDB    T2,IPTR            ; Odd numbered nybble
  14.     LSH    T1,4            ; First one is more significant
  15.     OR    T1,T2            ; Combine to make 8 bits
  16.     IDPB    T1,OPTR            ; Store it in output buffer
  17.     SOJG    T3,OUTPG1        ; Do all 2304 bytes
  18.     POPJ    P,
  19.  
  20. IPTR:    BLOCK    1
  21. OPTR:    BLOCK    1
  22. IBUF:    BLOCK    ^O<1000>        ; 1 page = 1000 (octal) words
  23. OBUF:    BLOCK    ^D<512*36/8>/4        : 2304 bytes @ 4 per word = 576 words
  24.  
  25. You will need to reverse this process if you are creating 36-bit data on a
  26. 32-bit machine to be sent via FTP.
  27.  
  28. Each pair of 36-bit words is 72 bits = 9 bytes.
  29.   byte0 = bits 00-07 of even word
  30.   byte1 = bits 08-15 of even word
  31.   byte2 = bits 16-23 of even word
  32.   byte3 = bits 24-31 of even word
  33.   byte4 = bits 32-35 of even word << 4 || bits 00-03 of odd word
  34.   byte5 = bits 04-11 of odd word
  35.   byte6 = bits 12-19 of odd word
  36.   byte7 = bits 20-27 of odd word
  37.   byte8 = bits 28-35 of odd word
  38.