Message board for the users of flat assembler.
> Main > End block
I have just started learning assembler today and i have a problem.
when i define a label do i have to initialize a block statement? or do i have to atleast close off a label that houses multiple commands?
Same: mov ax, 9 mov dl, str_same int 21h
but this comes up with an error on the int 21h and in object-pascal i get this error when i forget to close off the block :S
could n e one please help??
thanks a bunch ^__^
|02 Jul 2004, 01:25||
when i define a label do i have to initialize a block statement?
No, you don't have to close block statements. Actually there are block statements only in preprocessor directives, such as "if - end if". In assembler itself, there is no block statements at all.
Your code looks ok for me. The only problem can be "str_same" label that you didn't define in the code posted above.
|02 Jul 2004, 04:42||
btw, label were too in pascal (at least in turbo/borland), declared with "label" statement at variables definition place, and defined with name followed by ":", like
if something>0 goto x
Only difference is that in assembly you don't have to declare labels (like listing all labels with "label" statement in pascal), you only have to define them (name followed by colon).
|02 Jul 2004, 19:56||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.