0

When I was making my most recent youtube video, I tried to do the following to define a string of bytes..

main:
jmp .game
 win_msg db "You win!",0
.game:

but was greeted with compile errors saying that the label '.game' did not exist... I KNOW that it's possible to do this as I do it on the initial startup, so does anyone have any idea why it might not be working?

Specs: Intel processor, nasm16

This is not really a true problem as I found a way around it, I'm just very curious as to WHY it didn't work.

My video, the problem can be seen around 3:00..

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by iret
0

I didn't find a direct explanation for this in the NASM documentation, but it seems as though local labels must be declared before being used. I could not find a parameter which indicates how many passes NASM should take. The documentation says NASM is multi-pass by default.

I typed your code and tested assembled it. If you change .game to game, then your code assembles.

Edited by iret: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.