src-filters: Add missing includes, reduce warnings
[h316.git] / docs / HOWTO
1 How to build the mandelbrot-demo program
2
3 1. Needed
4
5 - source files (found in mandelbrot-demo.tar.gz):
6 apfel.f
7 pchar.asm
8
9 - compiler, assembler, loader, punch program (found in tape-images.new.tar.gz):
10 SLST-FRTN.img
11 SLST-LDR-APM.img
12 OBJECT-PAL-AP.img
13 SLST-DAP-16.img
14
15 - fortran library, 3 files (found in tape-images.new.tar.gz):
16 LIBRARY-FORT_LIB_1.img
17 LIBRARY-FOR_LIB_2S.img
18 LIBRARY-FORT_LIB_3.img
19
20
21 1. Prepare source files.
22 - You have to change the source files to <CR><LF> line termination (MS-DOS style)
23 - Then you have to set the 8th bit on all data - yes, you can't it read anymore...
24 There are also some tricks with an & in the emulator...
25
26 - Remove my header from the SLST files. In library files no problem.
27
28 - If you use the Emulator: go to step 2.
29 - If you use the original machine: punch out the source tapes :-)
30
31 2. Build pchar routine
32 PCHAR is a little assembler routine allowing simplest unformatted io.
33
34 - Boot SLST-DAP-16.img
35 - MSTCLR
36 - A reg: Set bits:
37 -1 Two-pass assembly
38 -3 Input from high-speed paper tape
39 -11 NO object output
40 -12 Listing on teletype
41 - P reg: '1000
42
43
44 Real machine:
45
46 - Mount the source tape into the high speed reader, turn on ASR
47 - press START and wait.....
48 - Assembly should stop at the end of text on the tape. Tape should not
49 run out.
50 - Reposition tape to the beginning.
51 - Press start again.
52 - After completion the assembler says "AC". With or without errors!!
53
54 Now you have a listing. Let's build the object file:
55
56 - Mount the source tape into the high speed reader, turn on ASR punch
57 - A-reg bits 1-3-7-16 (no listing, object to asr, no listing)
58 - P-REG 1000
59 - Reposition tape to the beginning.
60 - Press start again.
61 - After completion the assembler says "AC". With or without errors!!
62
63 Now you have the pchar object. Need it later.
64
65 Emulator:
66 - Same register settings as on real machine.
67 - Press START, emulator will ask for "ptr" file.
68 - enter "pchar.par" or whatever you have chosen for the converted file.
69 - The assembler will stop.
70 - Press START again.
71 - Will say EOF and ask for more paper. give source file again.
72 - Should print listing and say "AC"
73
74 Make the object:
75 - A-reg 1-3-8-16, P-reg '1000
76 - Same procedure but answer the questions "ptp" with your new
77 object's filename, "pchar.obj" for example.
78 - Notice: look closely if you're asked for PTP or PTR. If you enter your
79 source file name at PTP it will be erased instantly!!
80 - Leave emulator program. Important to really close.
81
82 Now you have the pchar object. Need it later.
83
84 NOTICE: Sometimes the emulator asks for a file
85 and does not echo your keystrokes.
86 BUT IT WORKS!!!!
87
88
89 3. Build mail object file
90 - That's easier than using the two-pass assembler....!
91 - Boot SLST-FRTN.img
92 - MSTRCLR
93 - A-reg settings:
94 -'000310: Listing on ASR, suppress verbosity by setting sense switch 2
95 -'000302: Object output to ASR
96 - Operation:
97 -Start at '1000 like with the assembler. But only one pass.
98 -Will type "end of job"....
99 - Now you should have two different object tapes or files.
100 - Leave emulator!!!!
101
102 4. Putting all together
103 - Boot SLST-LDR-APM.img
104 - MSTRCLR
105 - Change contents of memory address '15000 to '17777 or '37777
106 - MSTRCLR
107 - A-reg '17000, P-reg '16000
108 - OBJECT-PAL-AP.img needed. Mount tape now if using real hardware
109 - Press START TWICE
110 - if using emulator, enter "OBJECT-PAL-AP.img" at the PTR prompt
111 - LDR-APM now loads PAL-AP. Should say LC when ready. If it says CK you
112 have a checksum error on the tape. If tape runs out you have a problem
113
114 Now load apfel.obj:
115 - MSTRCLR
116 - P-reg '16000 A-reg '1000
117 - now the usual sequence "tape and start" for real machine, and "start and tape"
118 for emulator. using apfel.obj
119 - Will say MR. Means that you have unresolved symbols.
120 - If you like to you can set P-reg to '16002' and start. You'll get a memory map.
121
122 - Go on loading with pchar.obj. Loading continues if START is pressed
123 - Now process the library files the same way. The order is important. 1,2,3
124 - If you have managed this you will get LC (loading complete).
125
126 Now the application is ready to run. But wait! Don't you want to generate a
127 self loading system tape (SLST) with PAL-AP? Sure! So you can always restore the
128 actual state without doing all the patching stuff.
129
130 - Punch on ASR on.
131 - P-reg '17000', A-reg set only bit 1.
132 - Press START. Computer will halt.
133 - Enter '100 to A-reg and press START. Will halt again.
134 - Enter '6700 to A-reg and press START. Will begin to punch
135 self loading tape. (or ask for file etc... ASRPTP)
136
137 Now you have the SLST and can easily load the program by booting the tape.
138
139 5. Start the program
140 - When the program is loaded start the computer at '1000. That's all.
141 - When program is ready PA will be printed and CP halts. If you press START
142 it will start a new run.
143
144 6. Good luck. I hope I have described enough...
145
146
147
148
149
150