Re: Palette idea
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Dec 21, 1998
- 471 views
> Now I got a question too. How do one get rid of the ugly border in mode > 19? > The border seem to be of color 16, so if you set color 16 to black it > will be "gone". But I want to know if there's any better way to remove > it. I found two ways to do this: > Try this: > > > > > > > include machine.e > > > > procedure border_color(integer color) > -- set border & background color > sequence regs > regs=repeat(0,10) > regs[REG_AX]=#0B00 > regs[REG_BX]=color > regs=dos_interrupt(#10,regs) > end procedure > > > > > > > > > > Graeme. or > You can reprogram the vga card overscan (the border) color by doing the > following: > 1. read a byte from the input status register 1 (port #3DA) > you don't have to do anything with this value; it just resets some flags > in the vga hardware so we can do the next step. > 2. send the byte #31 to the attribute register (port #3C0) > 3. send the border color you want to the attribute register (port #3C0) > > > > You will need Jacques Deschenes ports.e to read and write ports. > or you could do it with the following machine code: > {#60, -- 0: pusha > #66,#BA,#DA,#03, -- 1: mov dx, #3DA > #EC, -- 5: in al, dx > #B2,#C0, -- 6: mov dl, #C0 > #B0,#31, -- 8: mov al, #31 > #EE, -- A: out dx, al > #B0,#00, -- B: mov al, yourcolor (12) > #EE, -- D: out dx, al > #61, -- E: popa > #C3} -- F: ret > > > -- _____ _____ _____ ________ /\ \ /\ \ /\ \ / \ \ / \____\ / \____\ / \____\ / _ \____\ / / ___/_ / /____/ / / ___/_ / / \ |____|/ / /\____\ / \ \ / / /\____\ \ \_/ / / \ \/ / ___/_\ \ \ \ \/ / ___/_ \ /____/ \ / /\ \\/\ \ \ \ / /\ \ \ \ \ \ \/ \____\ \ \ \ \ \/ \____\ \ \ \ \ / / \ \____\ \ / / \ \____\ \ / / \ / / \ / / \ / / \ / / \/____/ \ / / \/____/ \/____/xseal at harborside.com\/____/