Author Topic: PowerBasic assembler  (Read 3966 times)

Crupib

  • Regular Member
  • *
  • Posts: 2
PowerBasic assembler
« on: January 16, 2018, 12:48:30 PM »
I am trying to do the following in power basic using the inline assembler:
create an assembler block

asmdata tof
    dd 0000000
end asmdata

the following instruction fails

mov dl, [ebx+tof]

I tried numerous things including codeptr(tof)
nothing seems to work.
I get Error 427 Integer constant expedted.
a defined constant works, but it does not help me. I need to line up with the asm block and increment using ebx.
Any ideas?


hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10572
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: PowerBasic assembler
« Reply #1 on: January 16, 2018, 01:48:26 PM »
I am not sure what you are doing but try this.


! mov ecx, tof
! mov dl, BYTE PTR [eax+ecx]
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Crupib

  • Regular Member
  • *
  • Posts: 2
Re: PowerBasic assembler
« Reply #2 on: January 17, 2018, 12:03:44 PM »
Thanks I was able to get i5 to work with the offset instruction