[Larceny-users] LAP Format

Felix Klock felixluser at pnkfx.org
Mon Sep 22 17:56:43 EDT 2008


Ray-

Oh, I'm sorry Ray!  I wrote "make-readable" when I should have written  
readify-lap

readify-lap is available in the twobit.heap, but not in the larceny.heap

Also in the twobit.heap, the opcodes are all in a table (the same one  
readify-lap uses) named *mnemonic-names*; see below.

If you do not have a twobit.heap, then just follow the standard steps  
to load the compiler within Larceny.

Sorry about the mistake earlier!

Cheers,
-Felix

p.s. Here is an example usage:

% ./twobit
Larceny v0.97b1 (beta test) (Aug 25 2008 04:23:30, precise:Posix  
Unix:unified)
twobit.heap, built on Mon Aug 25 04:25:03 EDT 2008

 > (readify-lap '((15 100000000) (17 times) (11 unspecified) (37)))
((const 100000000)
  (setglbl times)
  (op1 unspecified)
  (return))

 > *mnemonic-names*
((70 . save/stores)
  (69 . reg/check)
  (68 . reg/branchf)
  (67 . reg/op3)
  (66 . const/setglbl)
  (65 . reg/setglbl)
  (64 . global/setreg)
  (63 . global/invoke)
  (62 . setrtn/jump)
  (61 . setrtn/branch)
  (60 . setrtn/invoke)
  (59 . reg/op2imm/setreg)
  (58 . reg/op2/setreg)
  (57 . reg/op1/setreg)
  (56 . reg/op2imm/check)
  (55 . reg/op2/check)
  (54 . reg/op1/check)
  (53 . reg/op2imm/branchf)
  (52 . reg/op2/branchf)
  (51 . reg/op1/branchf)
  (50 . op2imm/branchf)
  (49 . op2/branchf)
  (48 . op1/branchf)
  (47 . const/setreg)
  (46 . trap)
  (45 . check)
  (44 . branchf)
  (43 . branch)
  (42 . skip)
  (41 . jump)
  (40 . nop)
  (39 . apply)
  (38 . mvrtn)
  (37 . return)
  (36 . popstk)
  (35 . pop)
  (34 . restore)
  (33 . setrtn)
  (32 . save)
  (31 . invoke)
  (30 . args>=)
  (29 . args=)
  (28 . lexes)
  (27 . lambda)
  (26 . movereg)
  (25 . setreg)
  (24 . reg)
  (23 . store)
  (22 . load)
  (21 . setstk)
  (20 . stack)
  (19 . setlex)
  (18 . lexical)
  (17 . setglbl)
  (16 . global)
  (15 . const)
  (14 . op2imm)
  (13 . op3)
  (12 . op2)
  (11 . op1)
  (10 . \x2e;entry)
  (9 . \x2e;singlestep)
  (8 . \x2e;end)
  (7 . \x2e;proc-doc)
  (6 . \x2e;asm)
  (5 . \x2e;align)
  (4 . \x2e;cont)
  (3 . \x2e;proc)
  (2 . \x2e;label)
  (1 . \x2e;linearize))

 >





More information about the Larceny-users mailing list