Difference between revisions of "CPCBasic compiler"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Created page with "'''CPCBasic compiler''' (''Compilador cruzado BASIC para Amstrad CPC'') is a CPC Basic compiler for Windows (you need at least .NET 2.0). With this compiler you can write and...")
 
(Links)
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
is a CPC Basic compiler for Windows (you need at least .NET 2.0).  
 
is a CPC Basic compiler for Windows (you need at least .NET 2.0).  
 +
 +
Written by Emilio Guerrerog.
  
 
With this compiler you can write and compile your Basic programs (on the PC!) for the CPC.  
 
With this compiler you can write and compile your Basic programs (on the PC!) for the CPC.  
 
It will generate an assembler file which you can compile e.g. in emulators like WinApe or WinCPC, which means that the compiled Basic programs will run faster, because they aren’t interpreted on the CPC.
 
It will generate an assembler file which you can compile e.g. in emulators like WinApe or WinCPC, which means that the compiled Basic programs will run faster, because they aren’t interpreted on the CPC.
 
  
 
Consists of the compiler 'CPCBasic' and the library 'CPCBasic.bas'.
 
Consists of the compiler 'CPCBasic' and the library 'CPCBasic.bas'.
Line 13: Line 14:
  
 
== Usage ==
 
== Usage ==
 +
Just type your program on a PC text editor and then execute the compiler eg.:'' CPCBASIC TEST.BAS /6128''
  
Just type your program on a PC text editor and then execute the compiler eg.: CPCBASIC TEST.BAS /6128
+
After that, the compiler converts it to '' .asm'' (assembler file).
After that, the compiler convert it to .asm (assembler fike).
+
  
NOTE: Your program must start with command CHAIN "CPCBasic.bas" so that it links with the library.
+
NOTE: Your program must start with the command ''CHAIN "CPCBasic.bas"'' , so that it links with the library.
  
In order to create final bin file we need a proper Ζ80 cross assembler.
+
Now in order to create final bin file, we need a proper Ζ80 cross assembler.
  
For the assembler you can use Pasmo (http://pasmo.speccy.org/)
+
For the assembler you can use Pasmo (http://pasmo.speccy.org/).
Just enter pasmo test.asm test.bin and there you have your .bin file.
+
  
Furthermore, you can use InsSNA utility in order to insert your bin file into a SNA file (to use in a cpc emulator).
+
Just enter ''pasmo test.asm test.bin'' and there you have your .bin file!
 +
 
 +
Furthermore, you can use ''InsSNA'' utility in order to insert your bin file into a SNA file (to use in a cpc emulator).
 
Of course, you may also convert to .dsk to save to a real disc for use on a real CPC.
 
Of course, you may also convert to .dsk to save to a real disc for use on a real CPC.
 
Written by Emilio Guerrerog.
 
 
  
 
== Links ==
 
== Links ==
CPCBasic homepage (originally in Spanish, but can be translated)
+
CPCBasic homepage
  
http://www.telefonica.net/web2/emilioguerrero/CPCBasic/CPCBasic.html
+
https://cpcbasic.webcindario.com/CPCBasicEn.html
  
  
[[Category:Programming software]][[Category:BASIC]]
+
[[Category:Programming software]][[Category:BASIC]][[Category:CrossDev]]

Latest revision as of 15:16, 13 March 2023

CPCBasic compiler

(Compilador cruzado BASIC para Amstrad CPC)

is a CPC Basic compiler for Windows (you need at least .NET 2.0).

Written by Emilio Guerrerog.

With this compiler you can write and compile your Basic programs (on the PC!) for the CPC. It will generate an assembler file which you can compile e.g. in emulators like WinApe or WinCPC, which means that the compiled Basic programs will run faster, because they aren’t interpreted on the CPC.

Consists of the compiler 'CPCBasic' and the library 'CPCBasic.bas'.


Usage

Just type your program on a PC text editor and then execute the compiler eg.: CPCBASIC TEST.BAS /6128

After that, the compiler converts it to .asm (assembler file).

NOTE: Your program must start with the command CHAIN "CPCBasic.bas" , so that it links with the library.

Now in order to create final bin file, we need a proper Ζ80 cross assembler.

For the assembler you can use Pasmo (http://pasmo.speccy.org/).

Just enter pasmo test.asm test.bin and there you have your .bin file!

Furthermore, you can use InsSNA utility in order to insert your bin file into a SNA file (to use in a cpc emulator). Of course, you may also convert to .dsk to save to a real disc for use on a real CPC.

Links

CPCBasic homepage

https://cpcbasic.webcindario.com/CPCBasicEn.html