Tidying up tests. Adding fixes for use from another package.
[cl-x86-asm.git] / x86asm-test.lisp
blobc65ab69e26b02ba0264b8aedc15ce2556c1c560b
2 (defpackage :cl-x86-asm-test
3 (:use :cl :cl-x86-asm)
4 (:nicknames :x86-asm-test))
6 (in-package :cl-x86-asm-test)
8 ;; initialise our table of instructions
9 (make-instruction-hash-table)
11 ;; create a code segment
12 (make-segment "text" :segment-type :data-segment :set-to-current t)
14 ;; assemble some code in it
15 (assemble-forms
16 '((.Entry :PUSH :EAX)
17 (:SUB :EAX #XFFFEA)
18 (:MOV :EAX :EBX)
19 (:POP :EAX)
20 (:PUSH :EAX)
21 (.Exit :RET)))
23 ;; print the assembled segment
24 (print-segment)