mirror of
https://github.com/open-goal/jak-project
synced 2026-07-06 14:01:20 -04:00
19 lines
441 B
Plaintext
19 lines
441 B
Plaintext
(test-setup 1234567 #f)
|
|
|
|
(defun test-asm-function ()
|
|
;; enable asm-func mode (DANGER)
|
|
(declare (asm-func))
|
|
;; now we have no prologue/epilogue.
|
|
;; most operations involving variables are unsafe.
|
|
|
|
;; create a "safe" variable which is the rax register
|
|
(rlet ((ret :reg rax :type integer))
|
|
;; set to a numeric constant
|
|
(set! ret 1234567)
|
|
)
|
|
|
|
;; and do a return manually
|
|
(.ret)
|
|
)
|
|
|
|
(test-asm-function) |