flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Using "#" with labels

Author
Thread Post new topic Reply to topic
b0b



Joined: 22 Jan 2005
Posts: 4
b0b
Okay. I'm trying to figure out why this doesnt work. I read the docs but I couldn't find anything on it.

Code:
rept 17 count {
        j = count - 1
        isr#j:
                pushad
                mov esi, exception.#j
                call print
                cli
                hlt
}    


Expected output would be like so:
Code:
isr0:
        pushad
        mov esi, exception.0
        call print
        cli
        hlt

isr1:
        pushad
        mov esi, exception.1
        call print
        cli
        hlt

isr2:
        pushad
        mov esi, exception.2
        call print
        cli
        hlt
    
Post 27 Aug 2005, 17:46
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
This works for me:
Code:
        rept 2 n:0 {
         label isr # n
         pushad
         mov esi, exception. # n
         call print
         cli
         hlt
        }
    
Post 27 Aug 2005, 21:57
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.