mirror of
https://github.com/irmen/prog8.git
synced 2024-06-26 07:29:32 +00:00
added sys.disable_caseswitch() and sys.enable_caseswitch()
This commit is contained in:
parent
4de012fc49
commit
31177a2b1b
|
@ -198,6 +198,14 @@ _longcopy
|
|||
}}
|
||||
}
|
||||
|
||||
sub disable_caseswitch() {
|
||||
; no-op
|
||||
}
|
||||
|
||||
sub enable_caseswitch() {
|
||||
; no-op
|
||||
}
|
||||
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
; TODO
|
||||
|
|
|
@ -734,6 +734,20 @@ _longcopy
|
|||
}}
|
||||
}
|
||||
|
||||
inline asmsub disable_caseswitch() {
|
||||
%asm {{
|
||||
lda #$80
|
||||
sta 247
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub enable_caseswitch() {
|
||||
%asm {{
|
||||
lda #0
|
||||
sta 247
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
%asm {{
|
||||
|
|
|
@ -737,6 +737,20 @@ _longcopy
|
|||
}}
|
||||
}
|
||||
|
||||
inline asmsub disable_caseswitch() {
|
||||
%asm {{
|
||||
lda #$80
|
||||
sta 657
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub enable_caseswitch() {
|
||||
%asm {{
|
||||
lda #0
|
||||
sta 657
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
%asm {{
|
||||
|
|
|
@ -873,6 +873,8 @@ asmsub init_system() {
|
|||
jsr cbm.CHROUT
|
||||
lda #147 ; clear screen
|
||||
jsr cbm.CHROUT
|
||||
lda #8 ; disable charset case switch
|
||||
jsr cbm.CHROUT
|
||||
lda #PROG8_VARSHIGH_RAMBANK
|
||||
sta $00 ; select ram bank
|
||||
lda #0
|
||||
|
@ -1250,6 +1252,20 @@ _longcopy
|
|||
}}
|
||||
}
|
||||
|
||||
inline asmsub disable_caseswitch() {
|
||||
%asm {{
|
||||
lda #8
|
||||
jsr cbm.CHROUT
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub enable_caseswitch() {
|
||||
%asm {{
|
||||
lda #9
|
||||
jsr cbm.CHROUT
|
||||
}}
|
||||
}
|
||||
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
%asm {{
|
||||
|
|
|
@ -297,6 +297,14 @@ _longcopy
|
|||
}}
|
||||
}
|
||||
|
||||
sub disable_caseswitch() {
|
||||
; PET doesn't have a key to swap case, so no-op
|
||||
}
|
||||
|
||||
sub enable_caseswitch() {
|
||||
; PET doesn't have a key to swap case, so no-op
|
||||
}
|
||||
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
%asm {{
|
||||
|
|
|
@ -79,6 +79,13 @@ sys {
|
|||
}}
|
||||
}
|
||||
|
||||
sub disable_caseswitch() {
|
||||
; no-op
|
||||
}
|
||||
|
||||
sub enable_caseswitch() {
|
||||
; no-op
|
||||
}
|
||||
|
||||
sub gfx_enable(ubyte mode) {
|
||||
%ir {{
|
||||
|
|
|
@ -132,6 +132,9 @@ sys (part of syslib)
|
|||
``set_leds_brightness (ubyte activity, ubyte power)`` (commander x16 only)
|
||||
Sets the brightness of the activity and power leds on the computer.
|
||||
|
||||
``disable_caseswitch()`` and ``enable_caseswitch()``
|
||||
Disable or enable the ability to switch character set case using a keyboard combination.
|
||||
|
||||
|
||||
conv
|
||||
----
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
TODO
|
||||
====
|
||||
|
||||
- optimize when in case of constant value (only keep choice that matches)
|
||||
- revisit the seek example to see if write-seeking now works?
|
||||
- remove unused interned strings in the resulting code (for example from removed if/else blocks)
|
||||
- [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 ....
|
||||
|
|
Loading…
Reference in New Issue
Block a user