8052 Basic Computer

IS51

Link:

https://www.mikrocontroller.net/topic/380433


Im mk Forum vorgestellt 8052 (Basic) Platine. Zip enthält Eagle Platinen Layout Dateien, Partlist, Basic Source+Hex.

IS51.ZIP

Bild:

Minimalbestückung:


Programme

Romdir:
10 REM Basic ROM directory
20 ADR=8010H : PN=1
30 IF XBY(ADR)<>55H THEN  END
40 ADR=ADR+1 : BA=ADR
50 IF XBY(ADR)=1 THEN  GOTO 80
60 ADR=ADR+XBY(ADR): GOTO 50
80 GOSUB 100: PRINT : PN=PN+1 : ADR=ADR+1:   GOTO 30
100 PRINT "PRG",PN,"from ", :  PH1. BA, :  PRINT " to ", :  PH1. ADR,
110 PRINT " (",ADR-BA,"bytes)",
120 NB=XBY(BA)-2: IF NB<4 THEN RETURN
130 IF XBY(BA+3)<>96H THEN  RETURN
140 FOR XX=BA+4 TO BA+NB:PRINT CHR(XBY(XX)),: NEXT : RETURN

Romdump:
10 REM ROM dump
20 ADR=8000H
30 PRINT  :  GOSUB 70: PRINT  :  PRINT "More?",
40 A=GET :  IF A=0 THEN  GOTO 40
50 IF A<>27 THEN  GOTO 30
60 END
70 FOR XA=ADR TO ADR+255:  X=XA.AND.0FH:  IF X<>0 THEN  GOTO 90
80 PRINT  :  PH1. XA,
90 PH0. XBY(XA),:  NEXT :  ADR=XA:  RETURN

Fibonacci Zahlenfolge:
50 REM fibonacci
60 REM P.Sieg 2013
90 PRINT "Fibonacci Zahlenfolge"
100 A=0
110 B=1
150 PRINT A
160 PRINT B
200 C=A+B
210 PRINT C
220 A=B
230 B=C
250 GOTO 200

Pi:
50 REM Pi nach Archimedes 2^26 Eck
60 REM P.Sieg 2013
90 PRINT "Pi Berechnung"
100 A=2*SQR(3)
110 B=3
200 A=2*A*B/(A+B)
220 B=SQR(A*B)
250 PRINT A
260 IF A<>B THEN  GOTO 200

Mandelbrot:
2 PY=1
3 PX=1
4 X=0
5 XT=0
6 Y=0
7 I=0
8 XT = (X*X)/10 - (Y*Y)/10 + (PX-23)
9 Y = (X*Y)/5 + (10*PY - 75)/8
10 X = XT
11 IF (X/10)*X + (Y/10)*Y >= 400 THEN GOTO 15
12 I=I+1:IF I<11 THEN GOTO 8
13 PRINT "X",
14 GOTO 16
15 PRINT " ",
16 PX=PX+1:IF PX<31 THEN GOTO 4
17 PRINT
18 PY=PY+1:IF PY<15 THEN GOTO 3
19 END