Author Topic: SymbOS compilation in WinApe  (Read 2255 times)

0 Members and 1 Guest are viewing this topic.

Offline Ynot.zer0

  • CPC6128
  • ****
  • Posts: 293
  • Country: gb
  • Liked: 23
  • Likes Given: 63
SymbOS compilation in WinApe
« on: 22:20, 02 April 10 »
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.....
« Last Edit: 22:23, 02 April 10 by ynot.zer0 »

Offline Trebmint

  • 464 Plus
  • *****
  • Posts: 480
  • Country: zw
  • Liked: 364
  • Likes Given: 37
Re: SymbOS compilation in WinApe
« Reply #1 on: 13:11, 03 April 10 »
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.

Offline ZilogMonkey

  • CPC464
  • **
  • Posts: 18
  • Country: dk
  • Liked: 0
  • Likes Given: 3
Re: SymbOS compilation in WinApe
« Reply #2 on: 18:15, 03 April 10 »
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!

Code: [Select]
; 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

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 785
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 394
  • Likes Given: 60
Re: SymbOS compilation in WinApe
« Reply #3 on: 08:04, 06 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"