flat assembler
Message board for the users of flat assembler.
Index
> Main > graphics? |
Author |
|
Dex4u 26 Aug 2008, 15:18
Try this
Code: ;****************************** ; puts a pixel on screen ; using direct memory ; ; Dex. ; c:\fasm pixel.asm pixel.com ;****************************** org 0x100 use16 start: mov al,0x13 ; this is for seting graphic mode (32x200 256 color) int 0x10 push word 0xA000 ; set the address up pop es push cs pop ds mov di,0 ; when this is 0 we are at the top left hand corner ; eg replace the 0 with 320*100 will put the pixel ; 1/2 way down the screen. mov al,0xf ; this is the color of pixel stosb ; this mov a byte from al to [es:di] xor ax,ax ; wait for a a keypress int 0x16 mov ax,0x0003 ; back to text mode int 0x10 ret ; exit. You can modd this code to run in your OS, also you should use bootprog as that lets you boot a com or mz exe http://alexfru.chat.ru/epm.html#bootprog Also see MiniDos as example of basic 16-bit OS http://board.flatassembler.net/topic.php?t=5275&start=0 Also see here: http://www.dex4u.com/ASMcompo512b In there you will find boot sector OS's including a bootable tetrs game by Tomasz Grysztar and graphi demos |
|||
26 Aug 2008, 15:18 |
|
bitshifter 27 Aug 2008, 01:59
Ahhh..
That's perfect, just what i was looking for! I knew interrupt 0x10 could do it but i was unsure how. Thanks for the post! |
|||
27 Aug 2008, 01:59 |
|
ChrisLeslie 27 Aug 2008, 05:05
Thats fine if you want horrible chunky looking low-resolution graphics....
|
|||
27 Aug 2008, 05:05 |
|
Dex4u 27 Aug 2008, 14:10
ChrisLeslie wrote: Thats fine if you want horrible chunky looking low-resolution graphics.... In the ASMcompo512b link is a simple high res demo called "CdPod" including a 32-bit, pmode basic GUI in vesa 640*480 32 bpp mode, along with built in cdplayer, all in less than 512bytes and fits in boot sector. |
|||
27 Aug 2008, 14:10 |
|
myothant 31 Oct 2008, 09:00
hello,
I am beginner of flat assembler how to make to boot up computer system bye |
|||
31 Oct 2008, 09:00 |
|
roboman 31 Oct 2008, 14:53
|
|||
31 Oct 2008, 14:53 |
|
neville 31 Oct 2008, 19:53
Hi bitshifter
I agree that Vmode 13 is too low-res and chunky, so for 256 colours or more you really need to use one of the VESA graphics modes. If you can put up with only 16 colours, Vmode 12 can produce some good results, as I hope the attached demo illustrates - with a Christmas theme! (DOS binary + fasm source) I couldn't believe how difficult it was to produce colour graphics in 16-bit asm code when I first tried to do it about 4 years ago. After a lot of work I finally succeeded in producing a recogniseable bitmap image, but the colours were all wrong. Then it took a lot more work to get the colours right! I hope the attached fully-commented source will save you some of this work. Although it runs in DOS there are no INT 21h DOS calls so it will be easy to port to another OS, like yours! P.S. What are the objectives of your OS?
_________________ FAMOS - the first memory operating system |
|||||||||||
31 Oct 2008, 19:53 |
|
edfed 01 Nov 2008, 01:16
maybe it's time to test my advancement in pmode with vesa...
|
|||
01 Nov 2008, 01:16 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.