Jump to content
IGNORED

Action! snippets


Recommended Posts

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

 

  1. Write the program in the editor and save it on the disk.
  2. Clear Action! or restart the computer.
  3. Turn on Action! and go to the monitor.
  4. Run the program from the disk, which will install the RESET key handler.
  5. Go to the editor.
  6. Press RESET.

 

@JAC!,  maybe there is a possibility to add editor preferences without extra handler ?

 

 

 

Edited by Piotr D. Kaczorowski
Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...