--------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EE500017Date: 10/02/97 From: SAM IZZO Time: 05:22pm \/To: LEIGH MORRESI (Read 1 times) Subj: Re: VGA coding.... SpEEED! -=> Quoting Leigh Morresi to All <=- LM> Ive been dabbing a little in the mistic world of ASM coding... LM> basicly what I wanna do is to place a pixel at position X and Y on a LM> 320x200 (VGA) screen. Like So...... Ahh, the infamous 'my putpixel is faster than yours' saga, yet again =P LM> MOV AX,0A000h LM> MOV ES,AX LM> MOV DI,0 <--------- OFFSET LM> MOV SI,offset ImageData <------ VALUE LM> MOV CX,2000 <--- NUMBER OF BYTES TO COPY LM> CLD <-- INCREASE SI POINTER LM> REP MOVSW <--- COPY TO MEMORY But if all you want to do is place a pixel on the screen, why do any of this? LM> Could soembody post a good routine that you use in your demo LM> or game coding that will help me out here? PLEASE!.... Mmm.. Remember that you don't always need a putpixel.. If possible, try to incorporate the write to video memory into the routine, unless you're just drawing a dot-cube or something similar.. But! Drawing a pixel.. To get the offset, you could use a lookup table of Y*320 values.. The LEA trick _I think_ is best used in protected mode, ecause it makes use of 32-bit registers, and it's slow using these in real mode. o, a putpixel. This is how one might do it (without a lookup table): mov ax, 0a000h mov es, ax mov di, x mov ah, y add di, ax shr ax, 2 add di, ax mov al, col mov es:[di], al Of course, if you write to a buffer instead of straight to video memory, you'll need to clear al before loading ah with y. With a lookup table: mov ax, 0a000h mov es, ax mov bx, y shl bx, 1 mov di, x add di, word ptr lookup[bx] mov al, col mov es:[di], al and of course lookup is an array of words: For Y = 0 to 199 Begin Lookup[Y] = Y*320 End So there you go! Sam ... FOR SALE: Two hilarious taglines, never used. Asking $30 each. --- FMail/386 1.20+ * Origin: Comms Barrier BBS +61.3.9585.1112, +61.3.9583.6119 (3:632/533) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEA00000Date: 10/05/97 From: MARIUS BENDIKSEN Time: 11:51am \/To: ADAM MAJER (Read 1 times) Subj: Bootable code.. offsets > > only access ports? > Use the interupts in the bios system. That would not work once you've switched into protected mode. It is necessary to write own disk drivers for that purpose. Excellent documentation upon the IDE / SCSI / NEC765u interfaces are found in some of the last chapters of "The Indispensable PC Hardware Book", ISBN 0-201-40399-4. (Third Edition) -- SPEED 2.00 [NR]: -- Lord Nihil -- This is a microsoft-free zone. --- BBBS/NT v3.33 How * Origin: Circle of Protection +47 55961259 ISDN/V.34+ (2:211/37) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEA00001Date: 10/05/97 From: MARIUS BENDIKSEN Time: 11:51am \/To: EVERT CLONEN (Read 1 times) Subj: Assembly program > Hiya all, I'm quit new in this section and I'm thinking of installing > myself an assembler program(compiler) which one do you recommend and > where can I get it? Get the Netwide Assembler (NASM) from the internet. While you're there, I guess finding a link to some courses should be easy. -- SPEED 2.00 [NR]: -- Lord Nihil -- This is a microsoft-free zone. --- BBBS/NT v3.33 How * Origin: Circle of Protection +47 55961259 ISDN/V.34+ (2:211/37) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEA00002Date: 10/05/97 From: MARIUS BENDIKSEN Time: 01:02pm \/To: LEIGH MORRESI (Read 1 times) Subj: Bootable code.. offsets > So there for I would haveto generate all my own routines to replaec the int > 21's etc? Yes. No interrupts above interrupt 1F are available yet, so you'll have to make them yourself. > Adam Majer suggested that I use only BIOS calls, this seems a bit far fetched > rather slow!?!?! It is slow in most cases, yes. But a more important reason why you should write your own code is that the BIOS cannot be used in protected mode. (Of course, you'll have to use the BIOS in the OS Loader, but not in the rest of it) -- SPEED 2.00 [NR]: -- Lord Nihil -- This is a microsoft-free zone. --- BBBS/NT v3.33 How * Origin: Circle of Protection +47 55961259 ISDN/V.34+ (2:211/37) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEA00003Date: 10/05/97 From: MARIUS BENDIKSEN Time: 01:02pm \/To: DANIEL TROY (Read 1 times) Subj: CDrom > say u used lds ax,[100] > well instead do the following > mov ds, [102] > mov ax, [100] Won't work. Use: mov ax, [102] mov ds, ax mov ax, [100] -- SPEED 2.00 [NR]: -- Lord Nihil -- This is a microsoft-free zone. --- BBBS/NT v3.33 How * Origin: Circle of Protection +47 55961259 ISDN/V.34+ (2:211/37) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEA00004Date: 10/05/97 From: JAMES VAHN Time: 07:53pm \/To: JOHN GARDENIERS (Read 1 times) Subj: Re: dumb terminal > AM> You CAN'T (I SAID CANNOT) send files oves these messages. It just > AM> looks as a piece of crap! > > Yeah, and I think I spotted a spelling mistake in there somewhere as > well. ;-) Different reasons, but he and Max both seem to agree.. I worked on it some more, but when it started rebooting the computer it seemed like a good time to stop... ;-) --- ifmail-tx (i386 Linux) * Origin: jvahn@short.circuit.com (1:346/15.1@fidonet) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEB00000Date: 10/05/97 From: PETER LOUWEN Time: 09:10pm \/To: KURT WISMER (Read 1 times) Subj: Re: debugger -=> Quoting Kurt Wismer to Daniel Troy <=- KW> uh, sourcer? ida pro? they're both supposed to be good... Sourcer is a disassembler, not a debugger. He could try Turbo Debugger as well. Peter ... The best bilge pump in the world is a terrified sailor with a bucket. --- EBO-BBS Diemen - NL * Origin: EBO-BBS Diemen (http://www.worldonline.nl/~biginski) (2:280/901) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEB00001Date: 10/06/97 From: JERRY COFFIN Time: 09:17am \/To: MARIUS BENDIKSEN (Read 1 times) Subj: CDrom On (05 Oct 97) Marius Bendiksen wrote to Daniel Troy... MB> > say u used lds ax,[100] MB> > well instead do the following MB> > mov ds, [102] MB> > mov ax, [100] MB> Won't work. Use: MB> mov ax, [102] MB> mov ds, ax MB> mov ax, [100] While there is no instruction to move an immediate value into a segment register, moving a value from memory into a segment register (which is equivalent to part of what LDS does) is certainly allowed. Later, Jerry. --- PPoint 2.02 * Origin: Point Pointedly Pointless (1:128/166.5) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEB00002Date: 09/28/97 From: JEROEN JACOBS Time: 06:16pm \/To: PETER MAGNUSSON (Read 1 times) Subj: protetion mode Yow Peter !! Zondag September 21 1997 12:03, Peter Magnusson schreef naar Paul Wankadia: PM> btw, I've made my own DIR command. PM> If think I remember noticing that old OS/2 NewExe was PM> more similar to DPMI than the Windows 3.x NewExes... OS/2 and Windows do not use DPMI. Give one example of a win or os/2 program that uses int 31h for memory managment... ps: DPMI has NOTHING to do with the executable file format. (even a standard DOS MZ executable can be a 32bit DPMI application, see Tran's PMODE for more info). Bye ! _______ _______ _______ _______ _______ _ _ |_____ | | _____| | ___ | | ___ | | _____| | || | | | | | |_____ | |___| | | | | | | |_____ | | | | | _ | | | _____| | ___ _| | | | | | _____| | || | | | | |__| | | |_____ | | | | | |___| | | |_____ | | | || | |______| |_______| |_| |_| |_______| |_______| |_| | |_| --- * Origin: Voor mij ne Palm alstublieft. (2:292/516.2) --------------- FIDO MESSAGE AREA==> TOPIC: 145 ASSEMBLY LANG. Ref: EEB00003Date: 10/06/97 From: TED ROLLE Time: 10:01pm \/To: JAMES VAHN (Read 1 times) Subj: UUE, et. al. Hello James! Thursday October 02 1997 18:00, James Vahn wrote to Ted Rolle: j >> At the risk of tilting at windmills, would the compression/ASCII >> armor feature of PGP be acceptable? This part of PGP does not use >> encryption, so anyone would be able to read the messages. JV> You're tilting. ;-) These encoded messages are just a small part of JV> the traffic here and I'd just as soon stick to tools that can be JV> easily had. Not exactly a bad idea, but....no. Absolutely the last post from me on this subject. Honest. The reason I suggested PGP is that it is dependable. I've had less-than-phenomenal success with all of the varieties of UUE that abound. If there is a "standard" version, I'd like to get it and then shut up. ;-> Ted SMTP: troll@synthcom.com : Key fingerprint = 72 62 FB B9 04 73 49 2A 3B 20 A2 EE B6 38 59 --- GEcho 1.11+ * Origin: Acacia BBS, Eagle Creek, OR, 1-503-637-6624 (1:105/36)