     1 000000           ; RXV21_boot     From Microcomputer Interfaces Handbook 1983-84, page 484 (corrected)
     2 000000           ;                Use ODT to enter, then set RS=340, R6=1000, R7=1000, then P
     3 000000           ;
     4 000000                      ORG      O1000
     5 001000           ;
     6 001000 012700               MOV      #O100240,R0
     6 001002 100240    
     7 001004 012701               MOV      #O177170,R1       ; RXCSR
     7 001006 177170    
     8 001010 005002               CLR      R2
     9 001012 012705               MOV      #O200,R5
     9 001014 000200    
    10 001016 012704               MOV      #O401,R4          ; track 1, sector 1
    10 001020 000401    
    11 001022 012703               MOV      #O177172,R3       ; RXDBR
    11 001024 177172    
    12 001026 030011               BIT      R0,(R1)
    13 001030 001776               BEQ      $-4               ; wait for DONE or ERR
    14 001032 100437               BMI      O1132             ; branch to HALT if ERR set
    15 001034 012711               MOV      #O407,(R1)        ; set DDens, Read, Go
    15 001036 000407    
    16 001040 030011               BIT      R0,(R1)           ; wait for TransferRequest or ERR
    17 001042 001776               BEQ      $-4
    18 001044 100432               BMI      O1132             ; branch if ERR set
    19 001046 110413               MOVB     R4,(R3)           ; give sector number
    20 001050 000304               SWAB     R4                ; swap track and sector
    21 001052 030011               BIT      R0,(R1)           ; wait for TR or ERR
    22 001054 001776               BEQ      $-4
    23 001056 110413               MOVB     R4,(R3)           ; give track number
    24 001060 000304               SWAB     R4                ; swap sector and track
    25 001062 030011               BIT      R0,(R1)           ; wait for DONE or ERR
    26 001064 001776               BEQ      $-4
    27 001066 100421               BMI      O1132             ; branch if ERR set
    28 001070 012711               MOV      #O403,(R1)        ; EmptyBuffer (DDens) command
    28 001072 000403    
    29 001074 030011               BIT      R0,(R1)           ; wait for TR or ERR
    30 001076 001776               BEQ      $-4
    31 001100 100414               BMI      O1132             ; branch if ERR set
    32 001102 010513               MOV      R5,(R3)           ; set word count=128
    33 001104 030011               BIT      R0,(R1)           ; wait for DONE or ERR
    34 001106 001776               BEQ      $-4
    35 001110 100410               BMI      O1132             ; branch if ERR set
    36 001112 010213               MOV      R2,(R3)           ; set address=0
    37 001114 060502               ADD      R5,R2             ; increment...
    38 001116 060502               ADD      R5,R2             ; ...address
    39 001120 122424               CMPB     (R4)+,(R4)+       ; bump R4 by 2
    40 001122 120427               CMPB     R4,#3             ; sectors 1 and 3 get done
    40 001124 000003    
    41 001126 003737               BLE      O1026             ; loop if not finished
    42 001130 012700               MOV      #0,R0
    42 001132 000000    
    43 001134 005007               CLR      PC                ; go to address zero
