mirror of
https://github.com/irmen/prog8.git
synced 2025-07-15 21:24:11 +00:00
fix bank arg error in gfx2.position
This commit is contained in:
@@ -653,6 +653,7 @@ _done
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub position(uword @zp x, uword y) {
|
sub position(uword @zp x, uword y) {
|
||||||
|
ubyte bank
|
||||||
when active_mode {
|
when active_mode {
|
||||||
1 -> {
|
1 -> {
|
||||||
; lores monochrome
|
; lores monochrome
|
||||||
@@ -663,7 +664,8 @@ _done
|
|||||||
4 -> {
|
4 -> {
|
||||||
; lores 256c
|
; lores 256c
|
||||||
void addr_mul_24_for_lores_256c(y, x) ; 24 bits result is in r0 and r1L (highest byte)
|
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 -> {
|
5 -> {
|
||||||
; highres monochrome
|
; highres monochrome
|
||||||
@@ -673,7 +675,8 @@ _done
|
|||||||
6 -> {
|
6 -> {
|
||||||
; highres 4c
|
; highres 4c
|
||||||
void addr_mul_24_for_highres_4c(y, x) ; 24 bits result is in r0 and r1L (highest byte)
|
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 {
|
main {
|
||||||
|
|
||||||
sub start() {
|
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")
|
txt.print("hello")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user