Files
jak-project/test/goalc/source_templates/with_game/test-memset.gc
T
water111 e01e065170 [gcommon decomp] compiler and decompiler fixes (#239)
* wip

* decompile file-io

* a

* fix
2021-02-07 18:21:00 -05:00

20 lines
502 B
Common Lisp

(define format _format)
(let* ((base-addr #x6000000)
(word-cnt 23)
(base (the (pointer int32) base-addr))
(foo (mem-set32! base (+ 1 word-cnt) #x0))
(last-byte (the (pointer uint8) (+ base-addr 3 (* 4 (- word-cnt 1)))))
(dst (mem-set32! base word-cnt #x0badbeef))
)
(if (!= dst base)
(format #t "test failed, bad base returned!~%")
)
(if (!= 0 (-> last-byte 1))
(format #t "set too many bytes!~%")
)
(-> last-byte 0)
)