|
Post by jamesd on May 15, 2019 1:35:21 GMT
Hi all:
I tried looking this up ahead of time just in case someone had already asked. But the search term I used is only two characters long and too short to search.
I'm reading the C128 Assembly Language book and I'm on chapter 7 playing with the A.S program.
The book is using Merlin 128 as the assembler, which I think is a great assembler, but I prefer using CBM PRG Studio, it's got a lot of fantastic features and I'm finding it easy to use, which is great because now I can focus on learning machine language programming and not futzing with old school programming applications.
I've hit a bit of a snag though. I don't know if anyone can help but I figured this was a good place to start.
There's a line of code in the sample I'm playing with that I can't seem to translate from Merlin 128 to CBM Studio.
txtbuf ds buflen
I can't figure out exactly what ds does, and I can't find a pseudo op code in CBM Studio to use in it's place.
I've worked out: ORG *= ASC TEXT EQU =
So there are appropriate op codes to use.
Any help would be appreciated.
Thanks.
|
|
|
Post by oziphantom on May 15, 2019 10:15:26 GMT
DS is basically allocation these many bytes and set to 0
bytes is what you need so in this case you want bytes 0*buflen
|
|
|
Post by jamesd on May 15, 2019 14:02:40 GMT
Thank you.
I wasn't sure exactly what it did.
The hard part was finding the CBM Studio equivalent pseudo op code.
I ended up asking a friend of mine who has been writing code for a living for more than 25 years. She looked over my code, did a bit of research and found that the equivalent of DS in CBM Studio is BYTES.
My friend also pointed out where I had syntax errors and gave suggestions, she's wisely allowing me to struggle but offering help when I'm completely confused.
I've been writing BASIC code off and on since 1978, I've since learned a few other programming languages but could never wrap my head around assembly language but this time I'm making a concerted effort and I'm more determined than I had been in the past.
|
|
|
Post by john-atlanta on Feb 8, 2020 5:34:53 GMT
It is setting the keyboard buffer like you do from BASIC, example
poke (2592),1: rem set keyboard buffer to one
|
|