🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.acorn.tech
1 messages
1 total messages Started by Tom Kirby-Green Fri, 07 Aug 1992 17:23
Needs 'elp with C TINT fn.
#115
Author: Tom Kirby-Green
Date: Fri, 07 Aug 1992 17:23
42 lines
2236 bytes
Can any kindly C coder's out there 'elp with this! I need
to be able to select a colour in a 256 mode. I've tried 
to hack up the BASIC TINT command etc, but no joy so far.
The SWI I've been using along with GCOL is below.
Am I on the right track? OR am I barking up the wrong
SWI?
It'd be nice if Acorn would release the v3.1 PRMs so 
A5000 users could buy em, I refuse to buy the v2 ones until
I know I'll be able to upgrade.


        extern _kernel_swi_regs *inRegs;
        extern _kernel_swi_regs *outRegs;
        extern _kernel_oserror *kernelOSerr;

/* multipurpose VDU command */
        kernelOSerr = _kernel_swi ( VDU + 23, NULL, NULL );
/* select the TINT operation */
        inRegs->r [ 0 ] = 17;
/* action, range 0-3, sets text fore/background & graphics fore/background */
/* respectively */
        inRegs->r [ 0 ] = action;
        kernelOSerr = _kernel_swi ( OS_WriteC, inRegs, outRegs );
/* white, amount of white to add to base colour, values 0, 64, 128, 192. */
/* Only the top two bits of these values are significant                 */
        inRegs->r [ 0 ] = white;
        kernelOSerr = _kernel_swi ( OS_WriteC, inRegs, outRegs );


Thanks, as they say, in advance.

  /------------------| The Polytechnic Of Central London |-------------------\
  \     Name  : Tom Kirby-Green       /---\ / /    /--\ /\  \ /--\ /--\     /
   \    EMail : gpcec@sun.pcl.ac.uk   \---\ | |    \--  | \ | |    \--     /
    \   Serving : NCC-1701-D          \---/ / \--/ /--/ \  \/ \--/ /--/   /
     \----------| "Acorn Archimedes - A RISC Worth Taking!" |------------/    

-- 
  /------------------| The Polytechnic Of Central London |-------------------\
  \     Name  : Tom Kirby-Green       /---\ / /    /--\ /\  \ /--\ /--\     /
   \    EMail : gpcec@sun.pcl.ac.uk   \---\ | |    \--  | \ | |    \--     /
    \   Serving : NCC-1701-D          \---/ / \--/ /--/ \  \/ \--/ /--/   /
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads