use the new ldX/Y/Z in the bmp example

pull/21/head
Ondřej Hruška 4 years ago
parent e0e45bd223
commit 768f36ae18
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 12
      examples/bmp-parser.csn

@ -103,19 +103,17 @@
(proc rd4
; Read 4 bytes as little endian
(ld8 r0 @cin_r)(lsl r0 8)
(ld8 r0 @cin_r)(lsl r0 8)
(ld8 r0 @cin_r)(lsl r0 8)
(ld8 r0 @cin_r)
(sw32 r0)
(rev r0)
(ld8/8 r0 @cin_r)
(ld8/16 r0 @cin_r)
(ld8/24 r0 @cin_r)
(ret r0)
)
(proc rd2
; Read 2 bytes as little endian
(ld8 r0 @cin_r)(sw8 r0)
(ld8 r0 @cin_r)(sw8 r0)
(ld8 r0 @cin_r)
(ld8/8 r0 @cin_r)
(ret r0)
)
)

Loading…
Cancel
Save