/[cl-x86-asm]/cl-x86-asm/syntax.txt
ViewVC logotype

Contents of /cl-x86-asm/syntax.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Tue Feb 6 12:06:29 2007 UTC (7 years, 2 months ago) by jconnors
Branch: jconnors, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Initial import
1
2 ;; Lisp assembler syntax
3
4 (MOV :EAX #0XFF) ;; immediate
5 (MOV :EAX :EBX) ;; register
6 (MOV :EAX (:dword #X0FFF)) ;; direct
7 (MOX :EAX (:dword (+ :ES #X0FFF))) ;; direct based
8 (MOV :EAX (:dword (+ :ES (+ :EBX (* 2 :ESI) #0XFF))) ;; indirect based scaled index offset
9
10
11 (cond
12 ((= mod 0)
13 (cond
14 ;; special cases
15 ((= rm 5) (displacement 4))
16 ((= rm 4)
17 (let ((index (decode-register (extract-index sib)))
18 (dislpacement 4)))
19 (t (displacement 0)))))
20 ((= mod 1)
21 (displacement 1))
22 ((= mod 2)
23 (displacement 4))
24 ((not (= r/m 4)
25 (register (decode-register r/m))))
26 ((= r/m 4) ;; sib is present
27 (let
28 ((base-reigster (decode-register (extract-base sib)))
29 (index-register
30 (if (not (= (extract-index sib) 4))
31 (decode-register (extract-index sib))))
32 (scale (nth '(1 2 4 8) (extract-scale sib)))))))
33
34
35

  ViewVC Help
Powered by ViewVC 1.1.5