Piotr D. Kaczorowski Posted September 18, 2023 Share Posted September 18, 2023 (edited) EDITOR PREFERENCES Quote ; ACTION! Screen setup routine ; ; by Piotr D. Kaczorowski ; ; lang tips DEFINE DEF="PROC", END="RETURN" ,puts="PrintE" DEFINE _color2 = "$02" DEFINE _keyclick = "$FF" DEFINE _krepdelay = "$0C" DEFINE _keyrep = "$04" DEFINE _lmargin = "$00" DEFINE _lowerlett = "$00" DEFINE _bellon = "$4C" DEFINE _belloff = "$60" DEFINE _inserton = "$FF" CARD dosini_vec = $0C BYTE POINTER sixpage = $600 ; ; screen setup's routine ; BYTE ARRAY code = [ $48 ; PHA $A9 _color2 ; LDA #$02 $8D $C6 $02 ; STA $02C6 ;COLOR2 $A9 _keyclick ; LDA #$FF $8D $DB $02 ; STA $02DB ;NOCLIK $A9 _krepdelay ; LDA #$0F $8D $D9 $02 ; STA $02D9 ;KRPDER $A9 _keyrep ; LDA #$08 $8D $DA $02 ; STA $02DA ;KEYREPd $A9 _lmargin ; LDA #$00 $85 $52 ; STA $52 ;LMARGN $A9 _lowerlett ; LDA #$00 $8D $BE $02 ; STA $02BE ;SHFLOK $A9 _belloff ; LDA #$60 $8D $E0 $04 ; STA $04E0 ;Action! Monitor BELL OFF $A9 _inserton ; LDA #$FF $85 $9D ; STA $9D $68 ; PLA $4C $00 $00 ; JMP <pholder> $60 ; RTS ] DEFINE code_size = "44" CARD POINTER code_pholder = $29 ; ; Program start ; DEF main() ; install code at sixpage MoveBlock(sixpage, code, code_size) ; copy old dosini vec to code_pholder ; shifted to sixpage and set dosini ; vector to the sixpage code_pholder ==+ sixpage code_pholder^ = dosini_vec dosini_vec = sixpage puts("Pimp your Action!") puts("=================") puts("- set background to dark grey") puts("- set keyboard click off") puts("- set keyboard repeat delay") puts("- set left margin to 0") puts("- set lower letters") puts("- set monitor's bell off") puts("- set insert mode on") puts("") puts("Now please press the RESET key...") END Write the program in the editor and save it on the disk. Clear Action! or restart the computer. Turn on Action! and go to the monitor. Run the program from the disk, which will install the RESET key handler. Go to the editor. Press RESET. @JAC!, maybe there is a possibility to add editor preferences without extra handler ? Edited September 18, 2023 by Piotr D. Kaczorowski Quote Link to comment Share on other sites More sharing options...
Piotr D. Kaczorowski Posted September 18, 2023 Author Share Posted September 18, 2023 (edited) TCO Recursion - TAIL CALL OPTIMIZATION Edited September 18, 2023 by Piotr D. Kaczorowski Quote Link to comment Share on other sites More sharing options...
Piotr D. Kaczorowski Posted September 18, 2023 Author Share Posted September 18, 2023 ADVANCED CODE SEGMENT MANAGEMENT Quote Link to comment Share on other sites More sharing options...
+JAC! Posted September 21, 2023 Share Posted September 21, 2023 On 9/18/2023 at 10:27 PM, Piotr D. Kaczorowski said: @JAC!, maybe there is a possibility to add editor preferences without extra handler ? Which type of preferences/settings do you mean? The settings in the editor you get by pressing CTRL-M/O? Quote Link to comment Share on other sites More sharing options...
Piotr D. Kaczorowski Posted September 22, 2023 Author Share Posted September 22, 2023 7 hours ago, JAC! said: Which type of preferences/settings do you mean? The settings in the editor you get by pressing CTRL-M/O? Quote puts("- set background to dark grey") puts("- set keyboard click off") puts("- set keyboard repeat delay") puts("- set left margin to 0") puts("- set lower letters") puts("- set monitor's bell off") puts("- set insert mode on") For my own convenience, and from observing what people do (as seen on YouTube videos), I decided that an interesting solution would be to create a special RESET key handler, which sets the options as above. Such settings could be introduced in the next version of Action! in the preferences file. Then they should be taken into account when starting the editor and after returning from monitor mode to the editor. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.