VOGONS


MASM vs NASM

Topic actions

First post, by Akuma

User metadata
Rank Member
Rank
Member

I used to go to a 10 step process for converting MASM to NASM, however I cannot find that webpage anymore ๐Ÿ˜’ It worked out for the most part however I'm having trouble converting this statement:

inc word ptr ds:data[bx]

I know nasm doesn't use 'ptr', so that needs to be removed but how does that work with the brackets ? ๐Ÿค”

Reply 1 of 2, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Can probably use more common mnemonic instead of array: inc word ds:[bx+data], or possibly: inc word ds:[bx+offset data], just make sure the generated machine code references the correct memory.

BTW, for a topic that isn't specific to DOSBox, such as this one, please post it in Milliways. That you happen to be using DOSBox isn't a good enough reason to make it about DOSBox, n'est ce pas? ๐Ÿ˜‰

Reply 2 of 2, by Akuma

User metadata
Rank Member
Rank
Member
ripsaw8080 wrote on 2020-11-20, 15:25:

Can probably use more common mnemonic instead of array: inc word ds:[bx+data], or possibly: inc word ds:[bx+offset data], just make sure the generated machine code references the correct memory.

BTW, for a topic that isn't specific to DOSBox, such as this one, please post it in Milliways. That you happen to be using DOSBox isn't a good enough reason to make it about DOSBox, n'est ce pas? ๐Ÿ˜‰

Thanks ripsaw8080 ๐Ÿ˜