Article View: rec.games.programmer
Article #85Re: code for loading dire
From: Greg Alt
Date: Wed, 04 Nov 1992 16:56
Date: Wed, 04 Nov 1992 16:56
47 lines
1715 bytes
1715 bytes
In article <gate.J6cPTB1w165w@toz.buffalo.ny.us>, cyberman@toz.buffalo.ny.us (Cyberman) writes:
> asm {
> push es
> push ds
> mov ax, A000h
> mov es, ax
> mov ax, 320
> mul y
> add ax, height
> mov di, ax
> mov dx, width
> mov bx, height
> lds si, buffer
> }
>
> rowloop:
> asm {
> mov cx, dx
> rep movsb
> dec bx
> jnz rowloop
> pop ds
> pop es
> }
Here's how I do inline assembly in borland c++ (should work in TC++)
asm push es
asm push ds // do comments like this...
asm mov ax, A000h
asm mov es, ax
asm mov ax, 320 // another comment
asm mul y
asm add ax, height
asm mov di, ax
asm mov dx, width
asm mov bx, height // yet another comment
asm lds si, buffer
rowloop: asm mov cx, dx
asm rep movsb
asm dec bx
asm jnz rowloop
asm pop ds
asm pop es
It is more readable to me...
Technical Details
Message-ID:
<1992Nov4.095622.23606@hellgate.utah.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!peruvian.cs.utah.edu!galtReferences:
<gate.J6cPTB1w165w@toz.buffalo.ny.us>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!peruvian.cs.utah.edu!galt From: galt%peruvian.cs.utah.edu@cs.utah.edu (Greg Alt) Subject: Re: code for loading dire Date: 4 Nov 92 09:56:22 MST Message-ID: <1992Nov4.095622.23606@hellgate.utah.edu> Reply-To: galt%peruvian.utah.edu@cs.utah.edu Organization: University of Utah, CS Dept., Salt Lake City References: <gate.J6cPTB1w165w@toz.buffalo.ny.us> Lines: 47