Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Scheme > Re: Sassy-0.1.1...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 8 Topic 2542 of 4788
Post > Topic >>

Re: Sassy-0.1.1, Scheme Assembly

by "Alex Shinn" <alexshinn@[EMAIL PROTECTED] > Nov 13, 2005 at 10:08 PM

Jonathan Kraut wrote:
>
> AND...I welcome all questions, comments, criticisms, witticisms...

Hi,

This is really nice.  A few comments:

The implicit label definition may be problematic with frequent use
of macros, since a macro can silently overwrite a label.  An explicit
label form such as (label _start ...) might be better.

Local labels for use within macros are indispensible.  You can do this
implicitly by having all labels introduced within some scope be
replaced by a gensym in the output, or explicitly by naming them in a
scope.  For example:

  ;; Implicit, LOOP becomes a distinct gensym inside the nearest
  ;; enclosing LOCAL form for each expansion of MY-WHILE.
  ;; Optional: LAMBDA has an implicit enclosing LOCAL form.
  (macro my-while
    (lambda (test . body)
      `(local
         (label loop
           (if ,test
             (begin ,@[EMAIL PROTECTED]
 (jmp loop)))))))

  ;; Explicit, pre-declare LOOP to be a distinct gensym inside the
  ;; LOCAL block for each expansion of MY-WHILE.
  (macro my-while
    (lambda (test . body)
      `(local loop
         (label loop
           (if ,test
             (begin ,@[EMAIL PROTECTED]
 (jmp loop)))))))

Also some sort of access to the current assembler state in Scheme
escapes would be nice, for instance so that you can do things like:

  (data (str1 (bytes "hello world"))
        (str2 (bytes (! (string-upcase (sassy-ref 'the-string1))))))

Do you have any intention of ****ting to other platforms?  How about
sup****ting 64-bit mode? :)


-- 
Alex
 




 8 Posts in Topic:
[ANN] Sassy-0.1.1, Scheme Assembly
Jonathan Kraut <jak76@  2005-11-10 22:01:56 
Re: Sassy-0.1.1, Scheme Assembly
"Cruise Director&quo  2005-11-10 19:07:17 
Re: Sassy-0.1.1, Scheme Assembly
"Alex Shinn" &l  2005-11-13 22:08:36 
Re: Sassy-0.1.1, Scheme Assembly
Jonathan Kraut <jak76@  2005-11-14 23:11:51 
Re: Sassy-0.1.1, Scheme Assembly
"Alex Shinn" &l  2005-11-14 18:03:43 
Re: Sassy-0.1.1, Scheme Assembly
Jonathan Kraut <jak76@  2005-11-15 06:22:29 
Re: Sassy-0.1.1, Scheme Assembly
ansible@[EMAIL PROTECTED]  2005-11-15 18:08:35 
Re: Sassy-0.1.1, Scheme Assembly
Jonathan Kraut <jak76@  2005-11-15 22:36:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 22:23:10 CDT 2008.