That said, only the subtype=basic-dcio is properly working currently. Other subtypes have some issues with terminal characters being mismatched. This subtype is designed for full-monty hardware with 32k RAM. Code runs from 0x9000, by default.
Another option is to use the cpm build which is also working fully, which is what you'd do if you were running the rc2014 in that mode.
Search this forum for some threads on the topic.
Enjoy, feilipu
It is preferable to use pragma definitions unless there is a major hardware change, as z88dk is very flexible. Moving code, heap, or stack can all be done easily, on a per compile basis.
For 56k ram basic, the code origin can be moved lower like 0x2200, for example.
is this documented anywhere (all the pragmas)
is this documented anywhere (all the pragmas)
python slowprint.py > /dev/ttyUSB0 < hexload.bas
That will automatically start the hexload program running from origin at 0x8900, and it will wait for a z88dk HEX encoded program (asm or C) to be cat'ed to the RC2014.
cat > /dev/ttyUSB0 < eliza.ihx
# in a directory with the source files
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 password.c -o password -create-app
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 eliza.c -o eliza -create-app
# with your RC2014 connected
:~$ python slowprint.py > /dev/ttyUSB0 < hexload.bas
:~$ cat > /dev/ttyUSB0 < password.ihx # or
:~$ cat > /dev/ttyUSB0 < eliza.ihx#pragma output CRT_ORG_CODE = 0x2400 // new origin for 56kB RAM module.
#pragma output REGISTER_SP = 0 // stack origin is 0 (0xFFFF).
#pragma output CLIB_MALLOC_HEAP_SIZE = -1 // -1 has the crt automatically place the heap between the end
// of the bss section and the bottom of the stack
// (now located in its usual position above the bss).#pragma output CLIB_MALLOC_HEAP_SIZE = 0For compiles where the crt automatically generates a heap ( CLIB_MALLOC_HEAP_SIZE is negative), there is a heap size calculation done at runtime. If the heap size comes out negative, ie there is no space for a heap, the program will just terminate. When CLIB_MALLOC_HEAP_SIZE = -1, the crt creates a heap that extends from the end of your program to the bottom of the stack (the bottom of the stack is the current value of SP minus headroom CRT_STACK_SIZE bytes which is typically 256 or 512). When CLIB_MALLOC_HEAP_SIZE < -1, its absolute value is taken as the address of the last byte of the heap and the crt will try to make a heap from the end of your program to that address. The other options are 0 which eliminates the heap and a positive value which will create a heap of that size in the bss section.
There are many options for changing the way that z88dk builds the result, and these can be extensively controlled using pragmas. Some reading on the wiki, and searching / reading on z88dk GitHub will help.
Enjoy, feilipu[chris@xpslaptop C]$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -pragma-include=pragmas.inc -clib=sdcc_iy --max-allocs-per-node200000 test.c -o test -create-app
at 1: error 119: don't know what to do with file '+rc2014'. file extension unsupported
and it *looks* sane! - jeeze assembly language is such an easy language by comparison !
which points to the only copy of zcc I have...
I'm at a bit of a loss...
Does the compiler run on linux or is linux used just for building it?
tstfloat_map.asm
am9511a.asm
z80_lllf.asm
tstfloat.asmSECTION apu_data_align_256
ORG $2500
SECTION apu_data
ORG $2700
SECTION apu_driver
ORG $2800
SECTION apu_library
ORG $3000
SECTION code_user
ORG $9000> zcc +rc2014 --no-crt -m @tstfloat.lst -o tstfloat
> appmake +glue -b tstfloat --ihex --cleanINCLUDE "config_rc2014_private.inc"And the error you see:
"at 1: error 119: don't know what to do with file '+rc2014'. file extension unsupported"
is nowhere to be found in z88dk (I just did a search on the whole codebase).
https://feilipu.me/2016/09/16/z80-c-code-development-with-eclipse-and-z88dk/
Hope this helps.
okay that got it! (I think it works - many thanks!!!)
I had to change
-subtype=rom
to
-subtype=basic_dcio
but I guess that's down to the age of the post.
acia -startup=0 -Cz"+rom --ihex"
basic -startup=16 -Cz"+rom --ihex"
basic_dcio -startup=17 -Cz"+rom --ihex"
none -startup=256 -Cz"+rom --ihex"...as I understand it there has been significant work on bringing the rc2014
is Filippo github the definitive place to get it?
has anyone written a tutorial for getting this working (ideally on Linux) - what command line options etc ...
Is there any issue with using this to make code that will run from high memory and along side the 56k version of ms basic ?