BBC BASIC
« Re: Assembly Language for X86 Processors MASM »

Welcome Guest. Please Login or Register.
Jan 23rd, 2018, 7:11pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Re: Assembly Language for X86 Processors MASM  (Read 441 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 692
question Re: Assembly Language for X86 Processors MASM
« Thread started on: Aug 24th, 2016, 08:18am »

on Aug 24th, 2016, 02:15am, michael wrote:
Sadly, I realized that it was based on MASM not NASM, which are similar, but NASM is proper for BBC. I guess I will end up ordering a book on NASM.

I wouldn't recommend that, because although BBC BASIC's assembler is more similar to NASM, it is not identical and you would still have to learn the differences. If you've got a book that uses MASM for its examples I'd stick with that and just keep in mind that there will be a few changes necessary.

The only major difference between MASM's instruction syntax and BBC BASIC's is that in MASM memory references are usually implied by the declared variable type, whereas in BBC BASIC (and NASM) you must explicitly enclose the operand in square brackets [] to indicate a memory access:

MASM Code:
      mov eax,memory 

NASM Code:
      mov eax,[memory] 

I trust you've read the relevant section of the FAQ page at Where can I learn more about assembly-language programming on the PC?.

Richard.

P.S. Please post to the most appropriate section of the forum. Use General only as a last resort.
« Last Edit: Aug 24th, 2016, 08:20am by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls