www.cavefischer.at/Sharp Pocket Computer
// Uebertraegt eine Standard Textvariable mittels Serial.write an den Sharp PC-1401
char Textvariable[7] = "PC-1401"; // genau 7 Zeichen entsprechen einer Sharp Standard Textvariablen
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
}
void loop() {
if (digitalRead(2) == HIGH) {
for (int i=0; i<7; i++) {
while (!digitalRead(2));
Serial.write(Textvariable[i]);
while (digitalRead(2));
}
}
}
10:RESTORE
20:FOR X=0 TO 58
30:READ D
40:POKE &4200+X,D
50:NEXT X
100:"V"
110:A$=""
120:CALL &4200
130:PRINT "SHARP "+A$
140:GOTO 110
200:DATA 120,&42,&33,&85,2,&46,219,&84,2,&98,219,2,6,52
210:DATA 2,1,18,94,219,95,2,64,80,219,223,107,128,57,3
220:DATA 2,1,3,0,&83,107,128,40,2,71,90,43,7,4,83,35,18,94,219,95
230:DATA 47,36,16,&41,&FE,&84,0,1,27,55
Assemblerdarstellung des Maschinenprogramms | ||||||||||
&4200: | 120 | &42 | &33 | CALL | &4233 | |||||
&4203: | &85 | LP5 | ||||||||
&4204: | 002 | &46 | LIA | &46 | ||||||
&4206: | 219 | EXAM | ||||||||
&4207: | &84 | LP4 | ||||||||
&4208: | 002 | &98 | LIA | &98 | &4698 ist die Startadresse der Standardvariablen A$ | |||||
&420A: | 219 | EXAM | ||||||||
&420B: | 002 | 006 | LIA | 6 | ||||||
&420D: | 052 | PUSH | ||||||||
&420E: | 002 | 001 | LIA | 1 | < | ─ | ─ | ┐ | ||
&4210: | 018 | 094 | LIP | 94 | │ | |||||
&4212: | 219 | EXAM | │ | |||||||
&4213: | 095 | OUTF | │ | |||||||
&4214: | 002 | 064 | LIA | 64 | │ | |||||
&4216: | 080 | INCP | │ | |||||||
&4217: | 219 | EXAM | │ | |||||||
&4218: | 223 | OUTC | │ | |||||||
&4219: | 107 | 128 | TEST | 128 | < | ┐ | │ | |||
&421B: | 057 | 003 | JRZM | 3 | ─ | ┘ | │ | |||
&421D: | 002 | 001 | LIA | 1 | │ | |||||
&421F: | 003 | 000 | LIB | 0 | │ | |||||
&4221: | &83 | LP3 | │ | |||||||
&4222: | 107 | 128 | TEST | 128 | < | ─ | ┐ | │ | ||
&4224: | 040 | 002 | JRNZP | 2 | ─ | ┐ | │ | │ | ||
&4226: | 071 | ORMA | │ | │ | │ | |||||
&4227: | 090 | SL | < | ┘ | │ | │ | ||||
&4228: | 043 | 007 | JRNCM | 7 | ─ | ─ | ┘ | │ | ||
&422A: | 004 | IX | │ | |||||||
&422B: | 083 | MVDM | │ | |||||||
&422C: | 035 | RA | │ | |||||||
&422D: | 018 | 094 | LIP | 94 | │ | |||||
&422F: | 219 | EXAM | │ | |||||||
&4230: | 095 | OUTF | │ | |||||||
&4231: | 047 | 036 | LOOP | 36 | ─ | ─ | ─ | ┘ | ||
&4233: | 016 | &41 | &FE | LIDP | &41FE | |||||
&4236: | &84 | LP4 | ||||||||
&4237: | 000 | 001 | LII | 1 | ||||||
&4239: | 027 | EXBD | ||||||||
&423A: | 055 | RTN |
Arduino UNO Pin | Name | Sharp PC-1401 11-pol. Schnittstelle |
GND | GND | Pin 3 |
D2 (Input, mit pull-down Widerstand) | Port Fo1 | Pin 4 |
D1 (TX0, Serielle Schnittstelle über Inverter-Baustein an Sharp) | Xin | Pin 6 |