News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Ynot.zer0

SymbOS compilation in WinApe

Started by Ynot.zer0, 20:20, 02 April 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ynot.zer0

I downloaded the SymbOS applications source code and wanted to compile one of the applications as a test (to learn how an app is constructed).


I opened up winape, opened the Assembler view and loaded the 'App-Calc' - I then noticed that I needed to load 'App-Calc1' and set the 'Library Path' to point to the dir. location of the 'SymbOS-Constants.asm'.


I can successfully assemble and this then writes the 9K 'AppCalc.exe' file to my PC.


I now want to test that 'AppCalc.exe' file inside SymbOS.  I used 'ManageDSK' to create a new DSK.  I added the 'AppCalc.exe' file to the DSK image.  I added it as a Binary file and left the default values (was this correct?).


I then load that DSK as Disc B in winape and I run |SYM, I then use SymCommander and navigate to.
I double-click on 'AppCalc.exe' and I get an error message stating that the 'file is not executable: The selected file is not executable in the SymbOS environment.'


I noticed that the original Appcalc.exe file size is: 9088 and the new one I created is 9216




Has anyone conducted the same exercise as this?  If so, did you do something different?  Do I need to do something different when I copy the file into the DSK image?


Has anyone created any applications for SymbOS? and can share any hints or tips.....

Trebmint

I think one of your issues is that symbos applications need to have a relocation file. Symbos apps are fully relocatable so they have to be assembled twice and the relocation data added. Not sure how to do this in winape though I believe it is.

ZilogMonkey

Hi!

Yes, the Winape assembler has this very powerfull feature (The only Assembler in feature I know of)

SymbOS uses this table to make programs run in 'virtual' memory!

The below code demonstrates how this works!


; Reloc-table-test
;

org &4000

jp  start

relocate_start ; Tells the assembler to start making the code relocatable

dw                   relocate_count    ; Number of entries in the table
relocate_table   begin    ; The table (addresses relative to begin)

.begin

ld hl,text_str

.loop   

ld a,(hl)
cp 0
ret z
call &bb5a
inc hl
jp loop

.text_str   

text    "Hallo",0

relocate_end ; Stops the assembler reloc table mechanism


/ZilogMonkey

Executioner

Quote from: ynot.zer0 on 20:20, 02 April 10
I noticed that the original Appcalc.exe file size is: 9088 and the new one I created is 9216

That's a 128 byte difference. WinAPE or ManageDSK may be adding AMSDOS headers to the file. btw, you can assemble directly to a DSK image in WinAPE
using write direct "b:appcalc.exe"

Powered by SMFPacks Menu Editor Mod