summaryrefslogtreecommitdiff
path: root/test-suite/standalone/sassy/tests/cell.scm
blob: d7064ce7511281b0ff18fc06e4e97f8f6ef28919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(macro define-cell
       (lambda (name init)
	 `(begin (macro cell-tag "CELL")
		  (data (label ,name (dwords cell-tag ,init)))
		  (macro ,(string->symbol
			   (string-append (symbol->string name) "-ref"))
			 (& ,name 4)))))
(define-cell foo 100)

(entry _start)

(text (label _start (mov ebx foo-ref)
	      (mov eax 1)
	      (int #x80)))