[Coco] SYSCALL syntax for BASIC09
    coco at jechar.ca 
    coco at jechar.ca
       
    Thu May  7 14:58:54 EDT 2020
    
    
  
  I have a manual that describes OS9 Syscalls
  but it does not explain how to use them
  with Basic09.
  I will show a shoret listing below with
  line numbers added for reference and ???
  indicateing the problem lines then I will
  explain what the problem is with each line.
01   PROCEDURE politekey
02   TYPE registers=cc,a,b,dp:BYTE;x,y,u:INTEGER
03???DIM A:STRING[2]
04   DIM regs:registers
05   PARAM key:STRING[1]
06???A$="0A"
07   RUN GFX2("CURXY",0,0)
08   LOOP
09     RUN INKEY(key)
10     (* Exit LOOP/ENDLOOP on key press  *)
11     EXITIF key<>"" THEN
12     ENDEXIT
13     (* F$Sleep call - rest of 100ms time slice. )
14     regs.x= 1
15     RUN syscall(A,regs)
16     RUN GFX2("CURXY",0,0)
17     PRINT " ";
18   ENDLOOP
19   END
So here In line Number 3 I do not know if I should use a two character 
string "0A"
or a single byte Hex value A and if the latter do I declarew A$ as BYTE 
or Integer.
In line Number 6 Should I have A="0A" or A=10 ?
Or Is my error someware else.
Charlie
    
    
More information about the Coco
mailing list