mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 23:29:55 +00:00
fix bank arg error in gfx2.position
This commit is contained in:
parent
cefef3d1be
commit
eb2d5bb1f8
@ -653,6 +653,7 @@ _done
|
||||
}
|
||||
|
||||
sub position(uword @zp x, uword y) {
|
||||
ubyte bank
|
||||
when active_mode {
|
||||
1 -> {
|
||||
; lores monochrome
|
||||
@ -663,7 +664,8 @@ _done
|
||||
4 -> {
|
||||
; lores 256c
|
||||
void addr_mul_24_for_lores_256c(y, x) ; 24 bits result is in r0 and r1L (highest byte)
|
||||
cx16.vaddr(lsb(cx16.r1), cx16.r0, 0, 1)
|
||||
bank = lsb(cx16.r1)
|
||||
cx16.vaddr(bank, cx16.r0, 0, 1)
|
||||
}
|
||||
5 -> {
|
||||
; highres monochrome
|
||||
@ -673,7 +675,8 @@ _done
|
||||
6 -> {
|
||||
; highres 4c
|
||||
void addr_mul_24_for_highres_4c(y, x) ; 24 bits result is in r0 and r1L (highest byte)
|
||||
cx16.vaddr(lsb(cx16.r1), cx16.r0, 0, 1)
|
||||
bank = lsb(cx16.r1)
|
||||
cx16.vaddr(bank, cx16.r0, 0, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,12 @@
|
||||
main {
|
||||
|
||||
sub start() {
|
||||
ubyte bank
|
||||
|
||||
; TODO give error that a register is used as an argument value and at the same time is a register parameter taking a new value.
|
||||
; (note: this is OK if the register is used as an argument for a register param that is the same register)
|
||||
cx16.vaddr(lsb(cx16.r1), cx16.r0, 0, 1)
|
||||
|
||||
txt.print("hello")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user