flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Chewy509
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 |
|||
![]() |
|
vid
Quote: I have made a super generic putpixel function.. super-generic = slow fast = totoally not generic |
|||
![]() |
|
hckr83
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 |
|||
![]() |
|
rugxulo
hckr83 wrote:
>++++++++[<+++++++++>-]<++++++.>+++++[<++++++>-]<+++.>++[<++>-]<+.>++ +++++++[<--------->-]<---.>+++++++++[<+++++++++>-]<+.>+++[<---->-]<-. ----.>+++[<+++>-]<++..>+++[<++++>-]<+.>+++++++++[<--------->-]<------ -.-..>+++++[<+++++>-]<+.>+++[<---->-]<-.----.>+++++[<------>-]<-. |
|||
![]() |
|
hckr83
not even gonna try to get that joke...
|
|||
![]() |
|
Madis731
![]() ![]() |
|||
![]() |
|
Dex4u
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! ![]() |
|||
![]() |
|
rugxulo
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! ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.