ebiguy Posted December 29, 2013 Share Posted December 29, 2013 Hi everybody, I tried to use symbol U_LOAD of SpartaDos 4.46 to run another program but I don't understand how to deal with FLAG symbol. I don't see the solution in the documentation (translated by Google). Basically, I am doing something like this: ldy #0 lda #<executable_filename sta FILE_P,y iny lda #>executable_filename sta FILE_P,y sty FLAG jsr U_LOAD It does not run anything.Of course, all uppercase labels (FILE_P, FLAG and U_LOAD are binded at runtime). I can see the value in Altirra ($0CE3 for FILE_P,...) The filename is also correct. When I place in executable_filename a wrong filename I got an error. With a right filename, the call to U_LOAD returns but nothing is run. Maybe the problem is with FLAG symbol ? I am not sure about 1) the way to fill it and 2) the value to set to run the executable. I don't know if I should store something in FLAG or consider FLAG as a pointer and if I can/must change FLAG to point to a byte inside my program ? And which value to use (the doc says bit 7 should be cleared but what is the use of the other bits, if any) ? Thank you for your help. Quote Link to comment Share on other sites More sharing options...
drac030 Posted December 29, 2013 Share Posted December 29, 2013 (edited) FLAG must be zeroed here, this selects the proper function of U_LOAD (i.e. load & execute). EDIT: also note that constructs like "lda #<some_address" are forbidden in a relocatable binary file. Example: ldx #$02 fn lda namep-1,x sta FILE_P-1,x dex bne fn stx FLAG jsr U_LOAD ... namep .word name name .byte 'FOOBAR.COM',$9b Edited December 29, 2013 by drac030 Quote Link to comment Share on other sites More sharing options...
ebiguy Posted December 29, 2013 Author Share Posted December 29, 2013 Hi drac030, I put zero (was 1 with my previous code) and now it works ! I should have try it before posting...sorry. Thank you for your lightning fast answer !!! BTW, porgramming for SpartaDOs is a real pleasure. Using SpartaDos is just a new experience on the Atari. Many thanks to all SpartaDos contributors and keep up the good work. Bye. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.