Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • About Bonfire
Nils M Holm
@AverageDog@mastodon.social  ·  activity timestamp 4 days ago

Still making slow progress on the CP/M port of version 3 of my tiny BASIC interpreter. Writing Z80 assembly languages definitely takes its time. 3500 lines so far and the first small programs are running, like the primes sieve in the screenshot. No FOR-NEXT so far, but it is far up on the to-do list.
The final CP/M version will implement the same language as this prototype in T3X: http://t3x.org/nmhbasic/index.html#v3
#BASIC #programming #CPM #Z80 #retrocomputing

T3X.ORG nmhbasic/index

A screenshot of the following NMH BASIC program:
100 LET M = 1000
105 DIM Z(M)
110 LET Z(0) = 2 : LET T = 1 : LET P = 1
115 PRINT 2, 
120 IF T >= M GOTO 200
130 LET P = P+2 : LET O = 1
140 LET I = 0
150 IF P//Z(I) = 0 LET O = 0 : LET I = T
160 LET I = I + 1 : IF I < T GOTO 150
170 IF O = 0 GOTO 120
180 LET Z(T) = P : LET T = T+1
185 PRINT P, 
190 GOTO 120
200 END
A screenshot of the following NMH BASIC program: 100 LET M = 1000 105 DIM Z(M) 110 LET Z(0) = 2 : LET T = 1 : LET P = 1 115 PRINT 2, 120 IF T >= M GOTO 200 130 LET P = P+2 : LET O = 1 140 LET I = 0 150 IF P//Z(I) = 0 LET O = 0 : LET I = T 160 LET I = I + 1 : IF I < T GOTO 150 170 IF O = 0 GOTO 120 180 LET Z(T) = P : LET T = T+1 185 PRINT P, 190 GOTO 120 200 END
A screenshot of the following NMH BASIC program: 100 LET M = 1000 105 DIM Z(M) 110 LET Z(0) = 2 : LET T = 1 : LET P = 1 115 PRINT 2, 120 IF T >= M GOTO 200 130 LET P = P+2 : LET O = 1 140 LET I = 0 150 IF P//Z(I) = 0 LET O = 0 : LET I = T 160 LET I = I + 1 : IF I < T GOTO 150 170 IF O = 0 GOTO 120 180 LET Z(T) = P : LET T = T+1 185 PRINT P, 190 GOTO 120 200 END
  • Copy link
  • Flag this post
  • Block
Log in

Bonfire community

This is a bonfire demo instance for testing purposes

btfree.social: About · Code of conduct · Privacy ·
Bonfire community · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Public Groups
  • Code of Conduct
Home
Login