This is the program, compiled with +zx -clib=sdcc_iy:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <spectrum.h>
void main(void)
{
tape_load_block(0x7000, 1, 0xff);
printf("Data loaded from tape?\n");
while(1); // wait for me to check the memory
}
Anyway, the tape is cued up to read the test data when the program starts:
but nothing happens after it runs. The tape browser still points to the header and nothing was copied to 0xB000. The TEST block was created with appmake +zx -b test.bin --org 0xB000 -o test.tap --noloader --blockname TEST
I tried to learn from an example (console/adv_a.c uses tape_load_block), but it doesn't compile. The readme says to use zcc +[machine] [file.c] but using zcc +zx adv_a.c results in:
Code: Select all
Error at file '/tmp/tmpXXZaDYLM.asm' line 49: symbol 'close' not defined
Error at file '/tmp/tmpXXy8kdo9.asm' line 79: symbol 'writebyte' not defined
2 errors occurred during assembly