flat assembler
Message board for the users of flat assembler.
Index
> Main > Is anything wrong with this? |
Author |
|
Chewy509 25 Feb 2007, 23:11
2 immediate problems. I assume your in 320x200x256colour graphics mode?
The screen buffer for this mode is located at a0000h not b8000h, (eg mov di, 0a000h). Also try using a segment override when placing your pixel, eg. mov [ds:bp], dl. As a side note, I highly recommend using ES instead of DS. Also 320 = 256 + 64... So instead of mul we can use 2 shifts and add the result. eg. Code: mov di, [y] ; di = y mov bx, di ; bx = y shl di, 8; di = di * 256 shl bx, 6; bx = bx * 64 add di, bx ; di = di + bx add di, [x] ; di = di + x mov bx, 0a000h mov es, bx mov [es:di], dl |
|||
25 Feb 2007, 23:11 |
|
vid 25 Feb 2007, 23:12
Quote: I have made a super generic putpixel function.. super-generic = slow fast = totoally not generic |
|||
25 Feb 2007, 23:12 |
|
hckr83 25 Feb 2007, 23:50
lol...it's only temporary, and I emulate the device wrong so it is at b8000..I did forget that BP uses SS though..(and it took me so long to implement that right!)
won't use ES...no support for segment overrides(yet) lol..you'd be suprised how fun you can have coding on an imcomplete instruction set |
|||
25 Feb 2007, 23:50 |
|
rugxulo 26 Feb 2007, 01:07
hckr83 wrote:
>++++++++[<+++++++++>-]<++++++.>+++++[<++++++>-]<+++.>++[<++>-]<+.>++ +++++++[<--------->-]<---.>+++++++++[<+++++++++>-]<+.>+++[<---->-]<-. ----.>+++[<+++>-]<++..>+++[<++++>-]<+.>+++++++++[<--------->-]<------ -.-..>+++++[<+++++>-]<+.>+++[<---->-]<-.----.>+++++[<------>-]<-. |
|||
26 Feb 2007, 01:07 |
|
hckr83 10 Mar 2007, 01:46
not even gonna try to get that joke...
|
|||
10 Mar 2007, 01:46 |
|
Madis731 10 Mar 2007, 10:38
it was BF* if I'm correct, but I don't know enough to translate it
|
|||
10 Mar 2007, 10:38 |
|
Dex4u 10 Mar 2007, 13:47
You could uses DexOS's BF* interpreter
http://jas2o.forthworks.com/dexforum/index.php?topic=55.msg1651#msg1651 PS: I would say it's " Not really! " |
|||
10 Mar 2007, 13:47 |
|
rugxulo 13 Mar 2007, 08:26
Yes, I said "Not really", as in "No, I'm not surprised at all, many people enjoy weird things like that from time to time." (Just in case you misunderstood me.)
EDIT: Check here for TXT2BF.C (worked as expected w/ GCC 4.1.0, aka DJGPP 2.04 beta). Also, a good small! BF compiler (written in NASM) is bfd. Have fun! |
|||
13 Mar 2007, 08:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.