mirror of
https://github.com/irmen/prog8.git
synced 2025-12-19 20:17:17 +00:00
changed (and fixed) msb(long) and lsb(long)
This commit is contained in:
@@ -6,14 +6,25 @@ main {
|
||||
sub start() {
|
||||
long @shared lv1 = $12345678
|
||||
|
||||
; TODO support long+1 / -1 expressions....
|
||||
cx16.r4 = msw(lv1-1)
|
||||
cx16.r5 = lsw(lv1-1)
|
||||
txt.print_uwhex(cx16.r4, true)
|
||||
txt.print_uwhex(cx16.r5, true)
|
||||
txt.print_ubhex(msb(lv1), true)
|
||||
txt.spc()
|
||||
txt.print_ubhex(lsb(lv1), true)
|
||||
txt.spc()
|
||||
txt.print_ubhex(lv1 as ubyte, true)
|
||||
txt.nl()
|
||||
txt.print_uwhex(msw(lv1), true)
|
||||
txt.spc()
|
||||
txt.print_uwhex(lsw(lv1), true)
|
||||
txt.nl()
|
||||
|
||||
txt.print_ubhex((lv1-1) as ubyte, true)
|
||||
txt.nl()
|
||||
; ; TODO support long+1 / -1 expressions....
|
||||
; cx16.r4 = msw(lv1-1)
|
||||
; cx16.r5 = lsw(lv1-1)
|
||||
; txt.print_uwhex(cx16.r4, true)
|
||||
; txt.print_uwhex(cx16.r5, true)
|
||||
; txt.nl()
|
||||
;
|
||||
; txt.print_ubhex((lv1-1) as ubyte, true)
|
||||
; txt.nl()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user