From: Maciej Witkowiak (ytm_at_elysium.pl)
Date: 2003-01-02 23:40:17
Groepaz dnia 02 sty 2003 o 23:11 +0100 napisał: > > I have never tried that myself (I'm just the programmer:-), but "main" is > > an export, which means that it is your program that needs to export a label > > called "main". > eh... obvious :=P adding a label "main" at the start of crt0.s did the trick, > thanx for the hint :) It works for having assembly completed but will not work on LUnix anyway. This is for future use, currently the first byte in CODE segment is the program entry point. > > If I understand that correctly, "main" is the label called by the Lunix > > loader to start a program. So just add a label "main" to the beginning of > > your startup code, export it, and things should start working. > yep :) lemme see if i can come up with a working hello world :o) Not with C. Some low level part is missing: stack - crt0.s has to allocate some memory and setup C stack there. Probably something will have to be changed in malloc/heap functions. Information about other segments (data+bss) is contained in o65 file and handled correctly. Download LUnix from CVS, the last release was quite some time ago and there were some changes, like adding a sample application for ca65 and o65 file format. If you want your Silver Surfer code be included in LUnix, please send it me so I can upload it to CVS. (to Uz) Looking at lunix.cfg for ld65 I see that ZEROPAGE segment begins at $80 - are zeropage locations in o65 put with $80+offset_in_zp_segment or just offset_in_zp_segment and it is up to loader to relocate them using zp base address from header? Current loader for LUnix does not relocate zp (it is silently assumed that base address of zp is 0) because applications have to have access to system data in $02-$80 range. ytm ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-01-02 23:40:31 CET