Re: 8051 assembler in Common Lisp



Greg Menke <gregm-xyzpdq@xxxxxxxxxxxx> writes:

> Peter Seibel <peter@xxxxxxxxxxxxxxx> writes:
>
>> Greg Menke <gregm-xyzpdq@xxxxxxxxxxxx> writes:
>>
>> >
>> > Yes it does, thanks! It looks like syntax is converging towards yours.
>> > By interning the labels, I can do arithmetic on them;
>> >
>> > (blt '(* :tiled-mode 2))
>> >
>> > for example.
>>
>> So that has nothing to do with interning the symbol. Interning is a
>> READ-TIME function. Assuming you've got the symbol you can use (setf
>> (symbol-value sym) whatever) and (eval sym) if you must. I'm still not
>> convinced that's a great idea but interning has (or should have)
>> nothing to do with it. To understand that, it might help to make sure
>> you understand how the following works:
>
> If you say so.
>
> But I intern top-level symbols at read time but do the labels in the
> final link pass once all addresses are known. I add an item to each
> top-level symbol's property list. The symbol-value is set to the linked
> address for all symbols so the address arithmetic will work.

Can you show us the code that "intern[s] top-level symbols at read
time"? Unless you wrote your own reader, the reader is already
interning the symbols which makes my wonder what you're really
doing. Also, a symbol doesn't need to be interned to have it's
symbol-value set. So, basically, what you're saying doesn't make any
sense. That may be because you're talking about something sensical in
a slightly incorrect way or because what you're doing actually doesn't
make complete sense.

-Peter

--
Peter Seibel * peter@xxxxxxxxxxxxxxx
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp * http://www.gigamonkeys.com/book/
.



Relevant Pages

  • Re: Macros, Symbols and Strings
    ... > prefer using strings than uninterned symbols, ... If I use "" the reader reads the code and does the ... So in this case interning could not be ...
    (comp.lang.lisp)
  • Re: 8051 assembler in Common Lisp
    ... > So that has nothing to do with interning the symbol. ... > (symbol-value sym) whatever) and if you must. ... But I intern top-level symbols at read time but do the labels in the ...
    (comp.lang.lisp)