[Coco] Basic09 and syscalls
L. Curtis Boyle
curtisboyle at sasktel.net
Thu Jan 17 23:14:20 EST 2019
Normally, syscall, inkey, gfx and gfx2 are pre-merged with RUNB (to save space). If you are trying to run your code from BASIC09, it will try to link these in, but if they are merged with RUNB, it will need 16K free. If you are running BASIC09 with a large memory specifier, you may need to change the specifier to lower. Make sure you have loaded RUNB as well, so that it gets all of those modules.
Failing that, if you have a very large program, you can pack it first, and then run it from the shell (which should automatically grab RUNB and anything merged with it.
L. Curtis Boyle
curtisboyle at sasktel.net
> On Jan 17, 2019, at 10:03 PM, Walter Zambotti <zambotti at iinet.net.au> wrote:
>
> Hi Guys and Girls
>
>
>
> I'm trying to revive some of my Basic09 apps and none of my syscalls are
> working!
>
>
>
> In the below code I am happy that the OPEN #path,"/w":UPDATE is working
> because if I comment
> out the syscalls the program goes on to display graphics.
>
>
>
> The error code for each and every syscall is 43 (Procedure not found)
>
>
>
> Happens on both CoCo3/VCC/OVCC OS9Lv2 and Nitros9.
>
>
>
> This code did run in the past!
>
>
>
> I get the feeling I haven't installed a component somewhere!
>
>
>
> Walter
>
>
>
> PROCEDURE allocate_screen
>
> PARAM path:INTEGER
>
> PARAM colorchart(6):STRING[16]
>
>
>
> TYPE registers=cc,a,b,dp:BYTE; x,y,u:INTEGER
>
> DIM regs:registers
>
> DIM register,color(16):INTEGER
>
> DIM callcode,optsect(32):BYTE
>
> BASE 0
>
>
>
> colorchart(0)="RED"
>
> colorchart(1)="LIGHT BLUE"
>
> colorchart(2)="GREEN"
>
> colorchart(3)="PURPLE"
>
> colorchart(4)="BLUE"
>
> colorchart(5)="YELLOW"
>
>
>
> color(0)=$00
>
> color(1)=$07
>
> color(2)=$38
>
> color(3)=$3F
>
> color(4)=$20
>
> color(5)=$24
>
> color(6)=$18
>
> color(7)=$1B
>
> color(8)=$10
>
> color(9)=$12
>
> color(10)=$28
>
> color(11)=$2D
>
> color(12)=$08
>
> color(13)=$09
>
> color(14)=$30
>
> color(15)=$36
>
>
>
> OPEN #path,"/w":UPDATE
>
> RUN gfx2(path,"DWSET",8,0,0,40,24,0,1,1)
>
> RUN gfx2(path,"FONT",200,2)
>
> RUN gfx2(path,"PROPSW","ON")
>
>
>
> FOR register=0 TO 15
>
> RUN gfx2(path,"PALETTE",register,color(register))
>
> NEXT register
>
>
>
> RUN gfx2(path,"CUROFF")
>
>
>
> callcode=$8D \(* Get Stat
>
> regs.a=path
>
> regs.b=0 \(* SS.OPT
>
> regs.x=ADDR(optsect)
>
> RUN syscall(callcode,regs) \(* error 43 here
>
>
>
> optsect(4)=0 \(* no echo
>
>
>
> callcode=$8E \(* Set Stat
>
> regs.a=path
>
> regs.b=0 \(* SS.OPT
>
> regs.x=ADDR(optsect)
>
> RUN syscall(callcode,regs) \(* error 43 here
>
>
>
> callcode=$8E \(* Set Stat
>
> regs.a=0
>
> regs.b=$94 \(* SS.GIP
>
> regs.x=$0100 \(* high res mouse in left port
>
> regs.y=$FF \(* no key repeat with delay
>
> RUN syscall(callcode,regs) \(* error 43 here
>
>
>
> RUN gfx2(path,"SELECT")
>
>
>
> END
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list