funkheld Posted August 5, 2015 Share Posted August 5, 2015 (edited) ........... Edited August 5, 2015 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted August 5, 2015 Author Share Posted August 5, 2015 (edited) I would like to MAD Pascal a File: MULBI.BIN load with "get". Start Address: $9060 Length:: $f00 (3840) if filelen change of $f00 to $800 the whole file of $f00 is always loaded. Why does not len $800 loaded? graphic-file is for the PM with collision. Thank you var dlist: array [0..52] of word; procedure InitDlist(a: word); begin dlist[0]:=$7070; dlist[1]:=$4d70; dlist[2]:=$9060; dlist[3]:=$0d0d; dlist[4]:=$0d0d; dlist[5]:=$0d0d; dlist[6]:=$0d0d;dlist[7]:=$0d0d; dlist[8]:=$0d0d; dlist[9]:=$0d0d; dlist[10]:=$0d0d; dlist[11]:=$0d0d;dlist[12]:=$0d0d; dlist[13]:=$0d0d; dlist[14]:=$0d0d; dlist[15]:=$0d0d; dlist[16]:=$0d0d;dlist[17]:=$0d0d; dlist[18]:=$0d0d; dlist[19]:=$0d0d; dlist[20]:=$0d0d; dlist[21]:=$0d0d;dlist[22]:=$0d0d; dlist[23]:=$0d0d; dlist[24]:=$0d0d; dlist[25]:=$0d0d; dlist[26]:=$0d0d;dlist[27]:=$0d0d; dlist[28]:=$0d0d; dlist[29]:=$0d0d; dlist[30]:=$0d0d; dlist[31]:=$0d0d;dlist[32]:=$0d0d; dlist[33]:=$0d0d; dlist[34]:=$0d0d; dlist[35]:=$0d0d; dlist[36]:=$0d0d;dlist[37]:=$0d0d; dlist[38]:=$0d0d; dlist[39]:=$0d0d; dlist[40]:=$0d0d; dlist[41]:=$0d0d;dlist[42]:=$0d0d; dlist[43]:=$0d0d; dlist[44]:=$0d0d; dlist[45]:=$0d0d; dlist[46]:=$0d0d;dlist[47]:=$0d0d; dlist[48]:=$0d0d; dlist[49]:=$0d0d; dlist[50]:=$0d41; dlist[51]:=a; end; procedure fileget; begin asm { stx @sp iccom equ $342 icbadr equ $344 icblen equ $348 icaux equ $34a ciov equ $e456 ldx #$10 lda #3 sta iccom,x lda <file sta icbadr,x lda >file sta icbadr+1,x lda #4 sta icaux,x jsr ciov ldx #$10 lda #7 sta iccom,x lda #$60 sta icbadr,x lda #$90 sta icbadr+1,x lda #0 ; file-len lo sta icblen,x lda #$f0 ; file-len hi/lo $f00 , at file-len $800 is still file-len $f00 loaded sta icblen+1,x jsr ciov ldx #$10 lda #12 sta iccom,x jsr ciov ldx @sp file DTA C'D:MULBI.BIN' }; end; begin InitDlist(word(@dlist)); InitGraph(7); DPoke(560,word(@dlist)); DPoke($58,36960); fileget; repeat until keypressed; end. Edited August 5, 2015 by funkheld Quote Link to comment Share on other sites More sharing options...
JamesD Posted August 5, 2015 Share Posted August 5, 2015 (edited) I realize English isn't your first language but you aren't using complete sentences so it's a little difficult to understand you.So, you want to load $0800 bytes and it always loads $0f00 bytes even if you change this: lda #$f0 ; file-len hi/lo $f00 , at file-len $800 is still file-len $f00 loaded sta icblen+1,x jsr ciov to this: lda #$80 ; file-len hi/lo $f00 , at file-len $800 is still file-len $f00 loaded sta icblen+1,x jsr ciov Is that what you are asking?Double check the object file and/or executable are actually being replaced by a newer version when you recompile.The easiest solution is to delete the old ones and recompile. *edit*I'd also double check the address of the icblen parameter if that doesn't work. I haven't used the Atari ROM calls from assembly so I have no idea. Edited August 5, 2015 by JamesD Quote Link to comment Share on other sites More sharing options...
funkheld Posted August 5, 2015 Author Share Posted August 5, 2015 (edited) Is that what you are asking? lda #$80 ; file-len hi/lo $f00 , at file-len $800 is still file-len $f00 loaded sta icblen+1,x jsr ciov yes, but it is always loaded $f00. Why? The easiest solution is to delete the old ones and recompile. I have made. is perhaps my asm progam wrong ? Greeting Edited August 5, 2015 by funkheld Quote Link to comment Share on other sites More sharing options...
JamesD Posted August 5, 2015 Share Posted August 5, 2015 yes, but it is always loaded $f00. Why? is perhaps my asm progam wrong ? Greeting I compiled the code posted with the change to $80 and the assembler output from the compiler looks ok. That means either something went wrong during assembly and the assembler didn't generate a new file, you didn't test the right file or your assembly code is wrong. I'd have to look up the ROM call since I haven't used it myself, maybe someone else could be more help with the assembly code. Quote Link to comment Share on other sites More sharing options...
funkheld Posted August 5, 2015 Author Share Posted August 5, 2015 (edited) now it's working : lda <file >>>>>> lda #<file !!!!!!sta icbadr,xlda >file >>>>>> lda #>file !!!!!!!sta icbadr+1,x thank you. greeting Edited August 5, 2015 by funkheld 1 Quote Link to comment Share on other sites More sharing options...
JamesD Posted August 5, 2015 Share Posted August 5, 2015 (edited) now it's working : lda <file >>>>>> lda #<file !!!!!! sta icbadr,x lda >file >>>>>> lda #>file !!!!!!! sta icbadr+1,x thank you. greeting That would definitely be an issue. Edited August 5, 2015 by JamesD 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.