More PDP 11 hacking (help!)

From: Pete Turnbull <pete_at_dunnington.u-net.com>
Date: Wed Feb 9 02:19:43 2005

On Feb 8 2005, 16:10, Vintage Computer Festival wrote:
> On Tue, 8 Feb 2005, Pete Turnbull wrote:

> > If it helps, I can give you an annotated copy of the RXV21
bootstrap.
> > I've posted it here before, but I can do it again. I've got other
> > noddy toggle-in programs, for example one that prints out all the
valid
> > addresses in the I/O page, and I have a listing of the standard
> > addresses and what uses them.
>
> All this information would be highly useful to me, and posting it
here to
> the list will probably help someone else down the road, so please do
post
> it.

Ok, here are a couple, starting with the RXV21 bootstrap. The rest are
on my website, at http://www.dunnington.u-net.com/public/ODT/Listings/
In the directory above that, you'll find some other useful things, like
an opcode list, and a list of common I/O addresses and device
registers.

     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


    1 000000 ; > ECHO tests console by echoing characters
     2 000000 ; Uses polling to check UART is free
     3 000000 ;
     4 000000 ORG O1000
     5 001000 033727 GET: BIT _at_#O177560,#200 ; test RCSR -
bit7 set=char rec'd
     5 001002 177560
     5 001004 000310
     6 001006 001774 BEQ GET
     7 001010 013701 MOV _at_#O177562,R1 ; get character
     7 001012 177562
     8 001014 033727 SND: BIT _at_#O177564,#200 ; test TCSR -
bit7 set=ready
     8 001016 177564
     8 001020 000310
     9 001022 001774 BEQ SND
    10 001024 010137 MOV R1,_at_#O177566 ; send
character
    10 001026 177566
    11 001030 000763 BR GET ; repeat
continuously


-- 
Pete						Peter Turnbull
						Network Manager
						University of York
Received on Wed Feb 09 2005 - 02:19:43 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:37:36 BST