1. Interrupts(*HELP*) :)

I'm using the following to get the palette:

interrupt = repeat(0, 10)
interrupt[REG_AX] = #4F09
interrupt[REG_BX] = #01
interrupt[REG_CX] = 255
lowmem = allocate_low(256*4)
interrupt[REG_ES] = floor(lowmem/256)
interrupt[REG_DS] = lowmem - interrupt[REG_ES]*256

output = dos_interrupt(#10, interrupt)

But for some reason, my computer crashes, any suggestions?

new topic     » topic index » view message » categorize

2. Re: Interrupts(*HELP*) :)

Here's how I set my palettes.

rgb = {{14,0}} --dark blue

regs=repeat(0,10)

for i=1 to length(rgb) do
    rgb_seq = rgb[i]
    regs[7] = #1010
    regs[4] = index + i
    regs[6] = rgb_seq[2]
    regs[5] = rgb_seq[1]
    regs = machine_func(34, {#10, regs})
end for

RGB will initially be {0,0,14}-- dark blue color

create a very simple pre-processor to do the math for you first
--rgb_seq[2] * 256 + rgb_seq[3]
--rgb_seq[1] * 256
then include the preprocessed sequence in your program.

which then only requires a two element sequence {{14,0}}

euman at bellsouth.net


----- Original Message -----
From: Alexander <Carnivals at INAME.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Saturday, December 23, 2000 12:36 PM
Subject: Interrupts(*HELP*) :)


> I'm using the following to get the palette:
>
> interrupt = repeat(0, 10)
> interrupt[REG_AX] = #4F09
> interrupt[REG_BX] = #01
> interrupt[REG_CX] = 255
> lowmem = allocate_low(256*4)
> interrupt[REG_ES] = floor(lowmem/256)
> interrupt[REG_DS] = lowmem - interrupt[REG_ES]*256
>
> output = dos_interrupt(#10, interrupt)
>
> But for some reason, my computer crashes, any suggestions?
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Interrupts(*HELP*) :)

Sure you didn't misread? *GET* the palette, not set :)

new topic     » goto parent     » topic index » view message » categorize

4. Re: Interrupts(*HELP*) :)

Sorry, (set, get) whatever.
----- Original Message -----
From: Alexander <Carnivals at INAME.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Saturday, December 23, 2000 12:36 PM
Subject: Interrupts(*HELP*) :)


> I'm using the following to get the palette:
>
> interrupt = repeat(0, 10)
> interrupt[REG_AX] = #4F09
> interrupt[REG_BX] = #01
> interrupt[REG_CX] = 255
> lowmem = allocate_low(256*4)
> interrupt[REG_ES] = floor(lowmem/256)
> interrupt[REG_DS] = lowmem - interrupt[REG_ES]*256
>
> output = dos_interrupt(#10, interrupt)
>
> But for some reason, my computer crashes, any suggestions?
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu