I'm trying to allocate space for a table of addresses; each of these addresses will be 24 bits and supposedly Spasm64 supports the .dl directive for this. But I'm finding this to be ignored. I'm using Spasm64 v0.5 beta 2.


Code:

      ld   hl,runtime
      call     _Disphl
      call   _NewLine
      ld   hl,(runtime)
      call     _Disphl
      call   _NewLine
      ld   hl, prompt
      call   _Disphl

...bla bla bla...

runtime:
      .dl      prompt
      .dl      accept

prompt:
      ld      hl, prompttxt
      call   _Puts
      jp      next


The output of the above code is three numbers; the first and third numbers are identical and the second number is not the third number (though it should be).

So Spasm64 says the labels runtime and prompt are for the same location.

Any ideas?
Is SPASM64 the same as spasm-ng, which has ez80 support, and if so, are you specifying the -e option? Alternatively, if you're using SourceCoder 3 as your assembler, since it has spasm-ng built-in, are you specifying that it's an ez80 ASM program?
Are you entirely sure you're using the latest version from here? This sounds like a bug that was supposed to have been fixed for that version, and I just confirmed that the problem isn't there from a fresh download of that build.

Though, I notice that when you run that release with no arguments it says Version v0.5-beta.1, even though it's really v0.5-beta.2. More recent development versions include the build date, so we shouldn't have that problem in the future. But anyway, I would recommend redownloading just in case. If the problem persists after that, it would help if you post the entire source code so we can confirm the bug first-hand.
I am using the -E and -T options.

I experienced this problem with beta1 then found beta and still had the problem. I'll follow the provided link and dl again just to be sure.

I'll post my code so anyone can assemble and test when I get back home.

Thanks for the responses!
here's the code I'm running...

Code:

.assume ADL=1
#include "..\inc\ti84pce.inc"

   .org   userMem - 2
   .db   tExtTok, tAsm84CeCmp

main:
   call   cleanup
   xor      h
   xor      l
   ld      (curRow),hl
   ld      hl,runtime
   call   _Disphl
   call   _NewLine
   ld      hl,(runtime)
   call   _Disphl
   call   _NewLine
   ld      hl, prompt
   call   _Disphl
   call   _GetKey
   call   cleanup
   ret
   
runtime:
   .dl      prompt

prompt:
   ld      hl, prompttxt
   call   _Puts
   jp      next

next:
   pop      hl
   inc      hl
   inc      hl
   inc      hl
   push   hl
   ld      ix,(hl)
   jp      (ix)

cleanup:
   call   _DelRes
   call   _Clrtxtshd
   call   _Clrscrn
   set      0,(iy+3)
   call   _HomeUp
   call   _DrawStatusBar
   ret

prompttxt:
      .db      "OK> ",0

   .end

This outputs 3 numbers; the 1st is equal to the 3rd, indicating Spasm considers the runtime and prompt labels to be for the same location.

Thanks in advance for any help you can give me. I've noticed that if I add successive .dl directives, Spasm will begin to separate the location of the two labels, but it's not by multiples of 3 bytes. I'll continue experimenting.

And Spasm64 is just the runtime filename for the 64 bit Windows version of Spasm-ng.
My mistake. I dl'd the beta2 of spasm-ng but stuck the exe in a folder which was not in my path; so I was continuing to use the beta1.

I see that .ds and .long behave as expected when using the beta2 assembler. The first displayed number is three less than the second and third numbers, which are equal.

Thanks for your patience! Now... back to work...
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement