[img] 6809 Tube™ Client code updates
 MDFS::Software.Tube.6809.updates Search  

Version 1.01 build A
DMB: Bugfix: Event handler status register was read wrong way.
JGH: EXECUTE passes caller's stack to callee. EXECUTE does not set code as current program, that is now responsibility of INITERR/OSINIT. OSCLI stack saving is now recursable.
Version 1.01 build B
JGH: Precheck for '*RUN' to point LPTR to correct parameters. More stack space for transient OSCLI commands.
Version 1.02
JGH: Rolled over to version 1.02.
Source code has assembly options to build v1.02-A with optimised PRHEX routines and test for 6309 SWI calls.
Version 1.02 build A
JGH: Bugfix: Only Transfer Type 4 (Execute) changes ADDRESS.
Version 1.02 build B
JGH: Bugfix: Data transfer FIRQ routines test DMA_DONE before transfering data so don't transfer erroneous extra byte or word.
Version 1.02 build C
JGH: Bugfix: Data transfer 6 checks bit 7 of status register as per all other Clients.
reload.bin   Temporarily load replacement client code on a live client. load=exec=0100, client code must be called 'Client09', 'Client09.bin' or 'Client09/bin'.

Changes to 6809 BBC API moving from v1.00
  • Programs used to have the option to call INITERR to find where BRKV and ESCFLG were. This is now no longer optional for programs that want to become the current application - the program that is re-entered on Soft Break. This prevents transient code from inadvertantly becoming the current program. It must be called with A=0 and DP set to the program's default Direct Page. On exit: X=>BRKV, Y=>ESCFLG, DP=DirectPage for this program, D,U=reserved. FAULT (the address of the last error) is at ESCFLG EOR 2. This is now official. In light of this, INITERR is renamed OSINIT. OSINIT can be called to read the system addresses without becoming the current program by calling with A=&FF.
    Programs should start up with code similar to:
        CLR A               ; A=0
        TFR A,DP            ; Default DirectPage
        JSR OSINIT          ; We can now access DirectPage
        STY <ESCADDR        ; Note address of ESCFLG
        STY ,X              ; Claim BRKV
        LDA #$83
        JSR OSBYTE          ; Read bottom of user memory
        STX <MEMBOT
        LDA #$84
        JSR OSBYTE          ; Read top of user memory
        STX <MEMTOP         ; We can now access user memory
        TFR X,S             ; Put stack at top of user memory
  • Code is entered with registers set up as follows:
    A=0 (raw code) A=1 (code with a header) (as before)
    X=>command line parameters (as before)
    Y=code entry point (as before - unofficial)
    U=bottom of caller's stack - unofficial
    S=OSCLI stack (as before)
    The client makes sure that the command line pointer after *RUN correctly points to the parameter of the file that has been run, and not of the parameter of the *RUN command - ie, the filename being run. So, for example, *RUN hazel sheila correctly points the line pointer to sheila, just as */hazel sheila and *hazel sheila does.