+Propane13 Posted February 21, 2020 Share Posted February 21, 2020 Hello! I seem to remember being able to do something like the below with DASM, but I forgot the syntax: .set-byte (number of bytes), (value). e.g. if I wanted to set 64 bytes in ROM to zero, instead of doing ".byte 0" 64 times, I could just do: .set-byte 0,64 Of course, the above isn't valid syntax, but I could swear there was a way to do this. Any hints? Thanks! Quote Link to comment Share on other sites More sharing options...
+Propane13 Posted February 21, 2020 Author Share Posted February 21, 2020 As a follow-up / alternative, I seem to remember that you could set a macro somewhere to set the default fill-in value for undeclared ROM space to whatever you wish (e.g. $FF or 0). I would potentially also be interested in re-learning that as well. I'd appreciate any help. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted February 21, 2020 Share Posted February 21, 2020 ds 64,0 ; define 64 bytes, value 0 ds 32,5 ; define 32 bytes, value 5 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted February 21, 2020 Share Posted February 21, 2020 another way.... REPEAT 64 .byte 0 REPEND 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted February 21, 2020 Share Posted February 21, 2020 As to default fill... DASM manual... [label] ORG exp[,DefaultFillVal] This pseudop sets the current origin. You can also set the global default fill character (a byte value) with this pseudoop. NOTE that no filler is generated until the first data-generating opcode/psueoop is encountered after this one. Sequences like: org 0,255 org 100,0 org 200 dc 23 will result in 200 zero's and a 23. This allows you to specify some ORG, then change your mind and specify some other (lower address) ORG without causing an error (assuming nothing is generated inbetween). Normally, DS and ALIGN are used to generate specific filler values. 1 Quote Link to comment Share on other sites More sharing options...
+Propane13 Posted February 21, 2020 Author Share Posted February 21, 2020 This is EXTREMELY helpful. Thank you very much! 1 Quote Link to comment Share on other sites More sharing options...
JohnnyRockets Posted April 13, 2020 Share Posted April 13, 2020 On 2/21/2020 at 7:47 AM, Andrew Davie said: another way.... REPEAT 64 .byte 0 REPEND Hi all, Newbie here. I cannot find the REPEAT-REPEND command anywhere in any literature that I have. Can you point me to where/what/how to use this command properly? Thank you! JR Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted April 13, 2020 Share Posted April 13, 2020 6 minutes ago, JohnnyRockets said: Newbie here. I cannot find the REPEAT-REPEND command anywhere in any literature that I have. Quote Link to comment Share on other sites More sharing options...
JohnnyRockets Posted April 14, 2020 Share Posted April 14, 2020 Hi Darrell, Thank you. I read the documentation and it was very insightful. JR Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted April 14, 2020 Share Posted April 14, 2020 Doh! Should have answered that better - questions like these are better handled in the new Club DASM. We set up a central area for dasm because it's used to develop for multiple systems. 1 Quote Link to comment Share on other sites More sharing options...
JohnnyRockets Posted April 14, 2020 Share Posted April 14, 2020 Thank you! I was not even aware of the "club", LOL! Now I am following it. Is it okay to ask newbie DASM questions there? JR Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted April 14, 2020 Share Posted April 14, 2020 2 hours ago, JohnnyRockets said: Is it okay to ask newbie DASM questions there? Yep 1 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.