Hi all.
I am trying to join the bandwagon mixing C with asm and cross-compiling/assembling on Windows using vbcc/vasm/vlink and ultimately start making some demos using this setup.
1. I am using an asm demo-framework by Blueberry, which I am able to mix with C functions and compile/assemble using vbcc/vasm/vlink. This runs fine except when quitting the demo a guru comes with error code: 8000006 (CHK instruction trap?). I am not sure how to fix this..
2. I have also found Kalms' ADPCM sources and I am able to assemble the player example program using vasm, which works fine.
I have then tried to add the adpcm playback to the demoframework. This should not be difficult as Kalms' adpcm player is used very similar to how ThePlayer is used in Blueberry's demoframework. Everything assembles fine and also links with no errors after making necessary symbols 'public'. However, vlink still gives this warning:
vlink -L./ -L"C:\VBCC/targets/m68k-amigaos/lib" "C:\VBCC/targets/m68k-amigaos/lib/startup.o" -lamiga -lvc -Bstatic -bamigahunk -Cvbcc -s -lmieee -o src C2P1x1x8Small.o Framework.o StartUp.o Example.o main.o AdpcmSource.o PaulaOutput.o
Warning 58: Relative references between code section "CODE" and bss section "bss_c" (Example.o) force a combination of the two.
Warning 22: Attributes of section CODE were changed from r-x- in main.o to rwx- in Example.o.
When I try to run the program I get this error messagebox:
Program failed (error #80000004)
Suspend Reboot
which has to do with an illegal instruction. Has anybody had similar problems? I don't know enough about Amiga executables and m68k assembler to deduce what is going wrong and how to fix it... Help or hints highly appreciated..