Re: Assembly Help!!
From: John Williams (jwilliams_at_itee.uq.edu.au)
Date: 07/22/03
- Next message: Antti I.: "signal handler problem"
- Previous message: Marty: "Assembly Help!!"
- In reply to: Marty: "Assembly Help!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Jul 2003 10:44:04 +1000
Marty wrote:
> 1) It's a MMU page table making code. I don't understand '->' marked
> parts.
> It seems like to me that they're macro commands in macro definition. I
> mean, It seems like using macro command even though PT_ENTRY macro
> definition is not yet finished. and why they need some arguments
> within double quote??? What does that mean???
It's a recursive macro. Here's a simple example:
.MACRO RECURSIVE_TEST value
.if \value
.long \value
RECURSIVE_TEST "(\value-1)"
.else
.long 0x9999
.endif
.ENDM
Write out by hand what will be generated if you call this RECURSIVE_TEST
macro with a value of, say, 4... it will create the following output:
.long 4
.long 3
.long 2
.long 1
.long 0x9999
When you understand why, you'll be able to understand the PT_ENTRY macro.
The quotes are probably just to get around some text substitution rules
in the assember input format.
Cheers,
John
- Next message: Antti I.: "signal handler problem"
- Previous message: Marty: "Assembly Help!!"
- In reply to: Marty: "Assembly Help!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|