flat assembler
Message board for the users of flat assembler.
Index
> DOS > Can you see this on your computer? |
Author |
|
sinsi 21 Jun 2009, 02:29
Code: mov ax,1130h ;Get location of 8x14 font mov bh,2 ;es:bp is the font location int 10h 1130 is supposed to return Quote: CX = bytes/character of on-screen font (not the requested font!) |
|||
21 Jun 2009, 02:29 |
|
windwakr 21 Jun 2009, 02:35
Lol, I was reading that earlier, I guess I just wasn't focusing..Thanks.
Edit: EDIT: NEVERMIND, I had ds in a different segment. Good ol' DOS debug..... EDIT: I still can't get it working right for dosbox or virtualpc, their interrupt must not return the right number, because I can get it working if I directly code 14 into the char height. |
|||
21 Jun 2009, 02:35 |
|
sinsi 21 Jun 2009, 04:31
You are getting the 8x14 font - try the 8x16 font. I changed one bit of code and it works now in VMWare
Code: mov ax,1130h ;Get location of 8x14 font ;mov bh,2 ;es:bp is the font location mov bh,6 ; 8x16 font int 10h
|
||||||||||
21 Jun 2009, 04:31 |
|
sinsi 21 Jun 2009, 04:36
heh, change the block specifier to 0 and look what happens...
|
||||||||||
21 Jun 2009, 04:36 |
|
Coddy41 21 Jun 2009, 12:19
thats cool looking, it looks like a DOS meltdown
|
|||
21 Jun 2009, 12:19 |
|
windwakr 21 Jun 2009, 18:25
sinsi, thanks. Grabbing the 8x16 font fixes everything.
EDIT: But DOSBox displays the second font as bright. Does DOSBox not handle this code right, Or do I not have it properly implemented? It should disable the brightness bit from working, so the second font isnt always bright. Code: mov ax,1000h ;Disable the second font from being bright mov bx,0712h int 10h |
|||
21 Jun 2009, 18:25 |
|
windwakr 22 Jun 2009, 01:40
Does anyone have any ideas of how to flip the font up-side down? My only idea involves tons of push's, pop's, movsw's, and xchg's.
|
|||
22 Jun 2009, 01:40 |
|
sinsi 22 Jun 2009, 01:57
Code: ;upside down font mov cx,256 .0: mov bx,16 .1: lodsb mov [es:di+bx-1],al dec bx jnz .1 add di,16 loop .0 This is fun... |
|||
22 Jun 2009, 01:57 |
|
windwakr 22 Jun 2009, 02:02
Nice! I wouldn't have been able to think that up.
Code: mov [es:di+bx-1],al I didn't know you could do such complicated memory accesses [segment:offset +/- bx +/- number] Last edited by windwakr on 22 Jun 2009, 14:54; edited 1 time in total |
|||
22 Jun 2009, 02:02 |
|
rCX 22 Jun 2009, 03:51
Back in the day that would have been a brilliant virus
|
|||
22 Jun 2009, 03:51 |
|
windwakr 22 Jun 2009, 16:58
Does anyone have any info on what "BL > 0fh" does in "ax=1000h int 10h"? I see that when bl <= 0fh it replaces any color that bl specifies with the one in bh. But I don't understand what it does when bl > 0fh. The "mov bx,0712h" in my code was borrowed, so I don't understand it.
EDIT: Ok, after some google'ing I finally found some info on them HERE. The info starts at "Port-Index: 00h-0fh"(so you can search for that line) and the "Port-Index" would just be bl. EDIT2: Even more info on page 37 of This PDF. EDIT3: Attribute Mode Control Register wrote: 0 Graphics Mode — When this bit is 1, graphics mode is selected and pixel data from the frame buffer Bit 0 of Attribute Mode Control Register....could this be used to send pixel data to a text mode screen? EDIT4: Wow, The text mode palette can be edited, I didn't know that. You can pick 16 colors out of 262,000 to display on screen, do all machines support this? See palman.com in this file Code: (Table 00017) Values for attribute register number: 10h attribute mode control register (should let BIOS control this) 11h overscan color register (see also AX=1001h) 12h color plane enable register (bits 3-0 enable corresponding text attribute bit) 13h horizontal PEL panning register 14h color select register Would you like a red command prompt? (WINXP users run this from a command prompt.) Code: org 100h ;;;Let WINXP users see it too mov ax,13h int 10h mov ax,03h int 10h ;;; mov ax,1000h mov bx,0407h ;Replace DOS white with blood red int 10h ret |
|||
22 Jun 2009, 16:58 |
|
GhostXoPCorp 23 Jun 2009, 01:33
ok ,where did you learn all of these fonts? they al look very usefull
|
|||
23 Jun 2009, 01:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.