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

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 10:44pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

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


member is offline

Avatar




Homepage PM


Posts: 803
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 »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls