Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.msdos.programmer > #1004
| From | "Ed" <invalid@invalid.com> |
|---|---|
| Newsgroups | comp.os.msdos.programmer |
| Subject | Re: MS-DOS direct screen output - native and in a window |
| Date | 2013-09-28 20:34 +1000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <l26b6m$s68$1@speranza.aioe.org> (permalink) |
| References | <kvn372$vnt$1@dont-email.me> |
James Harris wrote:
> ...
> However, how should things like the screen size (rows and columns) be
> determined? I know there is a BIOS call int 0x10-0f to get the columns but
> not the rows.
Here's how I did it.
mov ax,0500h ; set video page = 0
cold1: call video
call gmode ; get video mode
cmp al,7 ; 80 col mono
jz cold2
cmp al,3 ; 80 col color
jz cold2
cmp al,2 ; 80 col b/w
jz cold2
mov ax,3 ; set video mode = 80 col color
jmp cold1 ; (screen will blank)
cold2: dec bh ; cols
mov wmax,bh
sub bh,bh
sub dl,dl ; assume old CGA card
mov ax,1130h
call video
or dl,dl ; rows if EGA+
jnz cold3
mov dl,24
cold3: mov wmax+1,dl
...
; get video mode AL=mode AH=page BH=cols
gmode: mov ah,0fh
call video
xchg bh,ah
mov word ptr cmode,ax ; save
ret
video: push si
push bp
int 10h
pop bp
pop si
ret
Back to comp.os.msdos.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
MS-DOS direct screen output - native and in a window "James Harris" <james.harris.1@gmail.com> - 2013-08-29 10:10 +0100
Re: MS-DOS direct screen output - native and in a window "R.Wieser" <address@not.available> - 2013-08-29 12:58 +0200
Re: MS-DOS direct screen output - native and in a window "Bill Buckels" <bbuckels@mts.net> - 2013-08-29 05:59 -0500
Re: MS-DOS direct screen output - native and in a window "Bill Buckels" <bbuckels@mts.net> - 2013-08-29 07:23 -0500
Re: MS-DOS direct screen output - native and in a window "Bill Buckels" <bbuckels@mts.net> - 2013-08-29 08:35 -0500
Re: MS-DOS direct screen output - native and in a window "Ed" <invalid@invalid.com> - 2013-09-28 20:34 +1000
Re: MS-DOS direct screen output - native and in a window pete@nospam.demon.co.uk - 2013-09-29 06:45 +0000
Re: MS-DOS direct screen output - native and in a window "Ed" <invalid@invalid.com> - 2013-09-29 19:33 +1000
Re: MS-DOS direct screen output - native and in a window "James Harris" <james.harris.1@gmail.com> - 2013-09-29 16:06 +0100
Re: MS-DOS direct screen output - native and in a window "Ed" <invalid@invalid.com> - 2013-10-01 11:28 +1000
csiph-web