flat assembler
Message board for the users of flat assembler.
Index
> DOS > fast graphics routines |
Author |
|
vid 05 Feb 2005, 10:25
well, they arent THAT fast...
anyway look for keyword "flat real mode", "unreal mode", "XMS", "EMS", "DPMI" (i quess the last three, especially the last one will be little too much for now) |
|||
05 Feb 2005, 10:25 |
|
Bitdog 05 Feb 2005, 10:59
CLS13h: ; proc, call with ES=0xA000, AL=color, & Vmode 13h set
MOV CX,320*200 ; =64000 & no buffer needed XOR DI,DI ; zero out DI=offset REPZ STOSB ;write AL to the screen seg RET // you don't need a buffer, do you ? RB = Reserve Byte means that the original data remains at that location and if you move it to the sreen seg as pixels, you git gibberish? don't you? You can speeed up my code by STOSW or STOSD (CX=32 or 16 thousand) ----------------- I've had a couple drinks tonight, (on foose ball night), so I don't really understand your COLOR-BOX code, but it looks like a double loop that paints a box in screen SEG. A simple LOOP in a LOOP is the cure to that. proc, call with, ES:DI=screen SEG:OFFSET, AL color, CX=height, DX=width PAINTbox: PUSH CX MOV CX,DX ;do width PUSH DI REPZ STOSB POP DI ADD DI,320 ; next line down POP CX LOOP PAINTbox RET ;it's kinda simple to paint a box, but makin it complicated is the hard part. I sometimes make a proc that has a calling macro below. The macro is used to call the proc and give it input, kinda like this. macro PBOXm SCRNoff,COLOR,HEIGHT,WIDTH { MOV DI,SCRNoff MOV AL,COLOR MOV CX,HEIGHT MOV CX,WIDTH CALL PAINTbox } with this macro, I can paint a box any where on the screen & anywhere in my code, like this: PBOXm 1290,4,20,30 Makes a box on line 4 (320*4=1280) indented 10 pixels ( +10) which is 20 pixels high & 30 pixels wide. The above is untested code, but you can mess around with it & maybe git it to werk for ya. It looks like you've been taught by someone who wants to look intelegunt more than he wants to help you. Your memory moves in a loop is slow code, & declaring a memory buffer of 64000 bytes of all the same color value to move to screen seg is bloat ware. Although my code is 8086 (8 bit code basicly) it can be altered to WORD or Dword SHR CX ; divides the WIDTH loop count x2 MOV AH,AL ; sets up for a word move (color x2) REPZ STOSW ; moves a word at a time The trade off of space & time is: THE SPACE/size, of the code includes the SHR & MOV = a few bytes THE SPEED/time, is cut in half (basicly). Alot of the math can be done by the great FASM assembler. Using the macro above, math can be used as an input. PBOXm (320*4)+10,0404h,20,30/2 so the offset is computed by the assembler, color 4 input is preset into AH & AL width is cut in half because AH & AL is a WORD write using STOSW. etc. If you're rendering a blem/pic use MOVSB in PAINTbox: ; proc, & data at DS:SI gits moved to ES:DI screen seg:off quik. I hope that helps some how. Bitdog (AAA = alcoholic asm animal) |
|||
05 Feb 2005, 10:59 |
|
Matrix 07 Feb 2005, 17:42
|
|||
07 Feb 2005, 17:42 |
|
edfed 23 Feb 2007, 17:28
i want to rebecome moile is this possible
i've forgot my password and tryed to remake moile login but impossible so i'm edfed but i want to have moile login again |
|||
23 Feb 2007, 17:28 |
|
DOS386 24 Feb 2007, 01:32
Quote: I am programming an OS You wouldn't need DOS if you really coded an OS Quote: code more than 640000 byte and i need all the memory Use DPMI. http://board.flatassembler.net/topic.php?t=6311 XMS would do the job also (but worse). Quote: i want to rebecome moile is this possible http://board.flatassembler.net/forum.php?f=7 Contact moderators. Hint: use [co.de] and [/co.de] in your next post. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
24 Feb 2007, 01:32 |
|
vid 24 Feb 2007, 01:54
edfed wrote: i want to rebecome moile is this possible i believe there is some "request new password", which should work for you if you entered valid e-mail. Otherwise you need to contact tomasz. Also, if you want just to change your name, it's enough to tell Tomasz to change it in database |
|||
24 Feb 2007, 01:54 |
|
Dex4u 24 Feb 2007, 15:43
This demo may help, it will let you do what you want, it include code to use vesa, but also let you go from pmode to realmode for using some bios int (including mode 13h).
http://www.dex4u.com/tuts/DemoVesa.zip Note: I was called ASHLEY4 when i made it. It bootable from a floppy or can run from Dos (only tested on MS-Dos). |
|||
24 Feb 2007, 15:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.