Article View: comp.sys.acorn.tech
Article #115Needs 'elp with C TINT fn.
From: Tom Kirby-Green
Date: Fri, 07 Aug 1992 17:23
Date: Fri, 07 Aug 1992 17:23
42 lines
2236 bytes
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 \---/ / \--/ /--/ \ \/ \--/ /--/ /
Technical Details
Message-ID:
<1992Aug7.172304.6291@sun.pcl.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pcl!gpcecShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pcl!gpcec From: gpcec@sun.pcl.ac.uk (Tom Kirby-Green) Newsgroups: comp.sys.acorn.tech Subject: Needs 'elp with C TINT fn. Message-ID: <1992Aug7.172304.6291@sun.pcl.ac.uk> Date: 7 Aug 92 17:23:04 GMT Organization: Polytechnic of Central London Lines: 42