OpenCores
URL https://opencores.org/ocsvn/pdp1/pdp1/trunk

Subversion Repositories pdp1

[/] [pdp1/] [trunk/] [sw/] [loader-code.txt] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 yannv
loader as read in papertapeImages/20060517/musicPlayingProgram.bin
2
 
3
origin 7751
4
7751   73_0002  rpb             read paper binary
5
7752   32_7760  dio 7760        deposit IO in 7760
6
7753   10_7760  xct 7760        execute recently read instruction
7
7754   32_7776  dio 7776
8
7755   73_0002  rpb
9
7756   32_7777  dio 7777
10
7757   73_0002  rpb
11
7760   60_1411  jmp 1411        jump to 1411 (overwritten by 7752!)     -- holds DIO/write pointer
12
7761   21_7760  lac [7760]      load ac from wherever 7760 points       \
13
7762   40_7776  add 7776        add value from 7776 to AC                } *7776 += *7760
14
7763   24_7776  dac 7776        save AC there                           /
15
7764   44_7760  idx 7760        AC <- ++*7760
16
7765   52_7777  sas 7777        skip if AC=*7777
17
7766   60_7757  jmp 7757        jump back to 7757 if *7760!=*7777
18
7767   20_7776  lac 7776        AC <- *7776
19
7770   40_7777  add 7777        AC += *7777
20
7771   73_0002  rpb
21
7772   32_7776  dio 7776
22
7773   52_7776  sas 7776        skip if AC=*7776
23
7774   76_0400  hlt             halt if checksums didn't match?
24
7775   60_7751  jmp 7751        restart loader (executing the next tape instruction)
25
jumps to entry point 7751 after loading that code
26
 
27
from this we gather:
28
first word will be DIO origin, where origin is the first address the program is loaded to
29
this instruction will be stored at write pointer (7760), 7776 (checksum in progress) and origin
30
second word is deposited in 7777; this is DIO to the end address (first address NOT written)
31
third word etc is written at origin and added to checksum 7776 until write pointer=end address
32
we've now reached 7767
33
AC is loaded with end address plus checksum thus far, another word is read and deposited as checksum
34
if calculated checksum in AC does not match this newly read checksum at end, halt
35
otherwise, start loading all over again
36
 
37
this allows a block format, where each block is:
38
DIO start
39
DIO end
40
end-start data words
41
checksum
42
 
43
Finally, as the first word always executes, a jump instruction can start the program.
44
So, in papertapeImages/20060517/musicPlayingProgram.bin the program blocks are:
45
0003-0100 checksum 716574
46
0100-0200 checksum 623702       (assuming from here on 000000s are block boundaries)
47
0200-0300
48
0300-0400
49
0400-0500
50
0500-0546
51
jump to 0404, the entry point of the program

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.