23 lines
982 B
Plaintext
23 lines
982 B
Plaintext
(module
|
|
(import "emu" "mem" (memory 1 1 shared))
|
|
|
|
(func (export "reset")
|
|
;; Write message into TXBUF
|
|
(i32.store8 (i32.const 0x0) (i32.const 0x48)) ;; H
|
|
(i32.store8 (i32.const 0x1) (i32.const 0x65)) ;; e
|
|
(i32.store8 (i32.const 0x2) (i32.const 0x6c)) ;; l
|
|
(i32.store8 (i32.const 0x3) (i32.const 0x6c)) ;; l
|
|
(i32.store8 (i32.const 0x4) (i32.const 0x6f)) ;; o
|
|
(i32.store8 (i32.const 0x5) (i32.const 0x2c)) ;; ,
|
|
(i32.store8 (i32.const 0x6) (i32.const 0x20)) ;; <space>
|
|
(i32.store8 (i32.const 0x7) (i32.const 0x77)) ;; w
|
|
(i32.store8 (i32.const 0x8) (i32.const 0x6f)) ;; o
|
|
(i32.store8 (i32.const 0x9) (i32.const 0x72)) ;; r
|
|
(i32.store8 (i32.const 0xa) (i32.const 0x6c)) ;; l
|
|
(i32.store8 (i32.const 0xb) (i32.const 0x64)) ;; d
|
|
(i32.store8 (i32.const 0xc) (i32.const 0x21)) ;; !
|
|
|
|
;; Update TXTAIL and set TXDATA
|
|
(i32.atomic.store8 (i32.const 0x42) (i32.const 0xd))
|
|
(i32.atomic.store8 (i32.const 0x40) (i32.const 0xff))))
|