Assembler data

New to FreeBASIC? Post your questions here.
Juergen Kuehlwein
Posts: 56
Joined: Mar 07, 2018 13:59
Location: Germany

Assembler data

Postby Juergen Kuehlwein » Mar 09, 2018 23:52

I need help with assembler syntax.

Please could somebody tell me, what is the FreeBASIC syntax for MASM: DB, DW, DD, DQ, DT, DDQ, and DO (as far as available in FreeBASIC).

"asm db 1" throws a compiler error, so how to code it (what is the correct syntax for this/these) ?


Thanks,

JK
deltarho[1859]
Posts: 1238
Joined: Jan 02, 2017 0:34
Location: UK

Re: Assembler data

Postby deltarho[1859] » Mar 10, 2018 4:58

Gas Common Directives

eg

Code: Select all

Dim As UByte testvar

Asm
  jmp here
label:
  .byte 1
here:
  lea eax, label
  mov eax, [eax]
 mov Dword Ptr [testvar], eax
End Asm

Print testvar

Sleep
Juergen Kuehlwein
Posts: 56
Joined: Mar 07, 2018 13:59
Location: Germany

Re: Assembler data

Postby Juergen Kuehlwein » Mar 10, 2018 9:41

Thanks!

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 2 guests