# HG changeset patch # User William Astle # Date 1669096465 25200 # Node ID ac52753bacfc04ac321ec048f1e474682ae432d4 # Parent c786c1dd4632cb1af612f4f9fe17f9359b421bef Enable capslock by default and keep it on reset diff -r c786c1dd4632 -r ac52753bacfc src/lwbasic.s --- a/src/lwbasic.s Mon Nov 21 22:38:01 2022 -0700 +++ b/src/lwbasic.s Mon Nov 21 22:54:25 2022 -0700 @@ -466,6 +466,8 @@ stx vartabstring ; put start of string variables after that stx objecttab ; also put the start of large objects there stx freestart ; mark the start of free memory + lda #keyb_caps ; enable caps lock but disable all other shift states + sta keyb_flags ldx #warmstart ; set up warm start handler stx RSTVEC lda #0x55 ; activate warm start handler @@ -560,7 +562,9 @@ keyb_reset ldx #keyb_buff ; point to start of keyboard ring buffer stx keyb_buffw ; set write point there stx keyb_buffr ; set read point there (pointers equal means empty buffer) - clr keyb_flags ; reset keyboard state flags + lda keyb_flags ; reset keyboard state flags but keep capslock + anda #keyb_caps + sta keyb_flags clr keyb_joystate ; clear joystick button state clr keyb_curscan ; stop any keyboard repeating ldx #0xffff ; mark all key state as "unpressed"