Re: Sort of Gray code to binary converter
- From: kensmith@xxxxxxxxxxxxxxx (Ken Smith)
- Date: Mon, 12 Dec 2005 14:44:19 +0000 (UTC)
In article <1134352497.340491.182910@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
slebetman@xxxxxxxxx <slebetman@xxxxxxxxx> wrote:
[... me ...]
>>
>> Y = Table[X];
>>
>
>I considered that one. That requires an array of 256 elements 93.75% or
>which simply store errors/illegal values. The switch statement on the
>other hand requires less typing (16 cases instead of 256 values).
In ASM you can do like this:
Table:
rept 256 ; Repeat 256 times
db 0FFH ; Fill with error
endm ; End repeat
org Table+00000011 ; Address the cell
db 1 ; Put the value in
org Table+00000110
db 2
..... etc .......
org Table + 256 ; put the pointer to after the table
.... more code ...
As is often the case, it is easier to do in ASM.
--
--
kensmith@xxxxxxxxx forging knowledge
.
- Follow-Ups:
- Re: Sort of Gray code to binary converter
- From: Rich Grise
- Re: Sort of Gray code to binary converter
- References:
- Sort of Gray code to binary converter
- From: John B
- Re: Sort of Gray code to binary converter
- From: slebetman@xxxxxxxxx
- Re: Sort of Gray code to binary converter
- From: Ken Smith
- Re: Sort of Gray code to binary converter
- From: slebetman@xxxxxxxxx
- Sort of Gray code to binary converter
- Prev by Date: Re: TURN SIX DOLLARS INTO $6000 EASY AND HONESTLY!!!
- Next by Date: For a copy of The Embedded Newsletter
- Previous by thread: Re: Sort of Gray code to binary converter
- Next by thread: Re: Sort of Gray code to binary converter
- Index(es):
Relevant Pages
|