Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')
From: Herbert Kleebauer (klee_at_unibwm.de)
Date: 11/09/04
- Next message: C: "Re: [OT] Paging Frank K. (was: 'Re: [OT] Why Bush?')"
- Previous message: grunthos: "Re: Unresolved Externals."
- In reply to: Annie: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Next in thread: C: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Reply: C: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Reply: Annie: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 09 Nov 2004 10:01:30 +0100
Annie wrote:
> On 2004-11-08 klee@unibwm.de (Herbert) said:
> They're not 'attacks,' Herbie. They're humorous attempts to
Must then be British humour which I don't understand.
> Besides, at least I post ASM code to this newsgroup. Beth
> hasn't posted any for eons. Hehe!
That's right. Since she started to support HLA she has stopped
assembly programming.
> > And here the same program in 42 instead of your 79 bytes:
>
> Thanks, Herbie. I like the improvements you made. Following
> your lead, I was able to reduce the program to 36 bytes.
But you really shouldn't use a random generator to remove
bytes from the code.
> Here's the revised source code:
>
> ;
> ; BETH-TV.ASM - Version 0.1
> ; A gift from Annie and Herbert
> ;
> code segment
> org 100h
> ;
What happend to the two lines:
mov ax,0003h
int 10h
This is required to clear the screen. If there is only
white text on the screen, you will see no difference
because you have selected now also white gray (0x0700)
as background. But try it with your old dark gray (0x3800)
or write some colored text to the screen before you execute
the program.
> mov ax,1000h
> mov bx,0700h
> int 10h
> mov dx,3C6h
> in al,dx
This "in" instruction can be removed.
> again:
> out dx,al
> add ax,cx
> add al,ah
> loop again
> ;
> mov ah,1
> int 16h
> jz again
>
> mov ah,0
> int 16h
Why don't you restore the Pixel Mask Register anymore?
mov al,0ffh
out dx,al
Not all video BIOS set this register when the video mode is changed.
>From the "TECNICAL REFERENCE GUIDE" for the COMPAC DESKPRO 386/20e
(a real great documentation):
In then column for any video mode you will find NP for the PEL Mask
Register (0x3c6).
NP - This register is not programmed during the setting of a BIOS mode.
This register is det during the post process and is never programmed
by the BIOS again.
> mov ax,0003h
> int 10h
> int 20h
A "ret" is shorter than a "int 20h"
> end
This get us back to my posted code!
Here a batch to write colored text to the screen. Execute it before
you execute your program and you will see why you need the code you
have deleted.
@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>ctext.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>ctext.com
echo pZsAZ~ZzOL@KtZ{O@}1guN?_g~K=G?U_Pg]NYG?w?KgBw}IqtH@wR?wABO>>ctext.com
echo LrFZp{@XEKH@lQNgw@ECuQtj{OM?DG@@_Aqo{Ox{R?kNv@ZjosB@IoXEFr>>ctext.com
echo @W@K~Xj~@XeK??BB0x>>ctext.com
cls
echo 1. echo line
ctext 10 20 9 This is a light blue/black text at pos 10,20
ctext 11 20 2 This is a green/black text at pos 11,20
ctext 12 20 4 This is a red/black text at pos 12,20
ctext 13 20 12 This is a light red/black text at pos 13,20
echo 2. echo line
ctext +15 20 160 This is a black/light green text at pos 15,20
echo 3. echo line
del ctext.com
:: usage: ctext line column color text
:: write text with color "color" to screen at pos (line,column)
:: use a + before column to update cursor position
- Next message: C: "Re: [OT] Paging Frank K. (was: 'Re: [OT] Why Bush?')"
- Previous message: grunthos: "Re: Unresolved Externals."
- In reply to: Annie: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Next in thread: C: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Reply: C: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Reply: Annie: "Re: [OT] Paging Frank K. (was: ' [OT] Why Bush?')"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|