Tom,
note the example I gave you started with
Code: Select all
bra job_start
dc.w 0
dc.w $4afb
dc.w 3
dc.b "Job"
if you change the "bra" to a "jmp" or a "bra.s", the code will either not properly assemble (jmp) or not show the proper job name (bra.s) when you do a "JOBS" - it is important that the dc.w $4afb starts exactly 6 bytes after the code start.
What's in the data area when a job starts:
A job in QDOS can have channels opened for it when it is started. That is done with the "EX" command (note you need TK2).
Code: Select all
OPEN #3,con_
EX #3 TO mdv1_job
PRINT #3,"Hello"
will connect S*BASIC #3 to a pipe that talks directly to the job, the channelId of that pipe will be handed over to the job in the data area. Anything you "PRINT" to that channel can then be directly read by the job (By calling IO.FBYT with the channel id, for example).
Another possible S*BASIC example would be
Code: Select all
EX flp1_list_exe;"flp1_program_asm" TO flp1_paginate_exe to flp1_print_exe
(If you know a bit of UNIX, something along the line of
Would do pretty much the same)
- Provided the programs are written to do what they are expected to, list_exe would list a file, pipe it into paginate_exe that would add page and maybe line numbers, piping it in turn to print_exe that would finally print it to the printer.
With a command line as above, EX creates the channels and hands them over to the jobs (both for input and output). A job that finds such arguments, could (doesn't need to, the channel handling is actually not mandatory) do as above.
The command line argument "flp1_program_asm" above would also end up in the data space as a normal string, after the channel ids. There it is ready to be picked up by the job just started. A nice way to hand over arguments to jobs, like the name of the file to list, as in the example above.
Hope this helps
Tobias