Re: I've seen the future...and it works! (was: my view on this assembler is blah)
From: luvr (spam-loving-criminal_at_spam-sink.net)
Date: 08/31/04
- Next message: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Previous message: luvr: "Re: repe cmpsb instruction"
- In reply to: Betov: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Next in thread: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Reply: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 30 Aug 2004 23:34:33 +0100
"Betov" <betov@free.fr> wrote in message
news:XnF955293A679829betovfreefr@212.27.42.73...
> Now, about commenting XXXXX registers given in the form of
> r0... rn, this is nothing but the demonstration of what i
> was discussing in the thead where this post has been extract
> from, that is: This kind of regs naming _removes_ the original
> meaning of the traditional namings. In other words such a
> _flat_ naming _decreases_, a lot, the readability.
Hmmm... The IBM mainframe has 16 general-purpose registers, identified by
number - so, they just go 0, 1, 2, ... 15.
Right - Just using these numbers does, indeed, hinder readability.
So - what does one do, then?
Simple: One uses EQUates to assign meaningful names to the registers.
Plus, to stress the fact that a given EQUate identifies a register number,
the common convention is, to begin register number equates with 'R' (for
"Register"). So, e.g.,
RBASECOD EQU 12 ; Base register for the code.
RBASEDAT EQU 11 ; Base register for the data.
RBASEINR EQU 10 ; Base register for input record.
<...>
(Not the best, or most inspired, example, really, but just something I could
quickly come up with.)
How's that for readability?
--Luc.
- Next message: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Previous message: luvr: "Re: repe cmpsb instruction"
- In reply to: Betov: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Next in thread: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Reply: Percival: "Re: I've seen the future...and it works! (was: my view on this assembler is blah)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|