Mega-Micro's
Microcomputer projects new & old
Mega-Micros Home
12 Edgefield Close
Redditch B98 7WB
ENGLAND
 
+44 (0)7973 265572
info@mega-micros.co.uk
68000 68030 CPLD FPGA ARM
SHOP        
Systems
68000 CPU
68000 CPU-2
68000 CPU-2.1
Backplane
Backplane-2
Memory
Memory-2
Memory-3
Memory-3.1
Hex Display
Dual 6850
Dual 6850-2
68681
68230
68230-2
ACRTC
IDE
IDE-2
Protoboard
Other Boards
Software
Programming
  EASy68K
  CP/M-68K
  GCC
Documents
Datasheets
Quick Tips
Blog
 
 
Programming with CP/M-68K
CP/M-68K commands can be typed in upper or lower case, however upper case is recommended.
 
 
Compiling BASIC programs
 
ASCIIART.BAS file contents:
 
10 for y=-12 to 12
20 for x=-39 to 39
30 ca=x*0.0458
40 cb= y*0.08333
50 a=ca
60 b=cb
70 for i=0 to 15
80 t=a*a-b*b+ca
90 b=2*a*b+cb
100 a=t
110 if (a*a+b*b)>4 then goto 200
120 next i
130 print " ";
140 goto 210
200 if i>9 then i=i+7
205 print chr$(48+i);
210 next x
220 print
230 next y
 
ASCIIART.BAS is an example BASIC program, here we convert this to an executable program:
 
Type: CB68 ASCIIART
Type: LINK68 ASCIIART.O,CB68.L68
 
To run the resulting executable:
 
Type: ASCIIART
 
 
Compiling C programs
 
HELLO.C file contents:
 
main()
{
      printf("Hello World");
}
 
HELLO.C is an example C program, here we convert this to an executable program:
 
Type: C HELLO
Type: CLINK HELLO
 
To run the resulting executable:
 
Type: HELLO
 
 
Assembly Language
 
HELLO.S file contents:
 
  text
start:  
  move #9,d0
  move.l #msg,d1
  trap #2
  rts
   
  data
msg: dc.b 13,10,'Hello World',13,10,'$'
 
HELLO.S is an example assembly language program, here we convert this to an executable program:
 
Type: AS68 -U -L HELLO.S
Type: LINK68 HELLO
 
To run the resulting executable:
 
Type: HELLO
 
 
Disclaimer
All hardware designs, software, and information shared on this website is provided "as is"
without warranty of any kind and strictly for personal non-commercial use only.
 
 
Website V0.97 (C) 2021 Mega-Micros
Status: under construction
Mega-Micros Home
12 Edgefield Close
Redditch B98 7WB
ENGLAND
 
+44 (0)7973 265572
info@mega-micros.co.uk