flat assembler
Message board for the users of flat assembler.
Index
> DOS > Need help getting a character from video memory... |
Author |
|
Dex4u 09 Apr 2006, 23:53
So near, but so far , this code, does what you want on my PC.
Code: org 100huse16Main:mov ah,09hmov dx,textOneint 21hmov bx,0x0B800mov es,bxxor di,dimov al,BYTE[es:di]mov BYTE[textTwo+9],al;cmp al, 'l';je PrintSuccess;int 20h;PrintSuccess:xor dx,dxxor ax,axmov ah,09hmov dx,textTwoint 21hxor ax,axint 16hint 20h Var: textOne db 'Hello',13,10,'$'textTwo db 'Returns: ', '$' |
|||
09 Apr 2006, 23:53 |
|
Steve 10 Apr 2006, 03:16
Hi, Dex. Wow, such bad luck! It seems I have been left out. This code doesn't work for me, either. Spook's code worked on his machine and yours worked on your own.. but they both don't work on mine. Terrible... :\
- Steve |
|||
10 Apr 2006, 03:16 |
|
TDCNL 10 Apr 2006, 07:00
I've tested this piece of code too, (from you both) and it doesn't work on my PC either (WinXP SP2 Pro).
_________________ :: The Dutch Cracker :: |
|||
10 Apr 2006, 07:00 |
|
Dex4u 10 Apr 2006, 11:23
Works on 5 win98, but not on xp, if yours is xp PC, then it does not seem to work on XP.
EDIT: I do not program on XP at all, but on some test i have just Carried out, it seems you can not directly access screen in XP. Eg: this works fine in win98 Code: org 100huse16Main:mov ax,0xB800mov es,axlea si,[textOne]mov di,2mov cx,10cldrep movsbxor ax,axint 16hint 20htextOne db 'H e l l o ' screenshot:
|
||||||||||
10 Apr 2006, 11:23 |
|
Steve 10 Apr 2006, 16:02
What a shame.. Oh well, thanks for helping me find out what was wrong.
|
|||
10 Apr 2006, 16:02 |
|
Dex4u 10 Apr 2006, 19:01
Theres always DOSBox, runs great even on XP .
http://dosbox.sourceforge.net/news.php?show_news=1 |
|||
10 Apr 2006, 19:01 |
|
Matrix 10 Apr 2006, 21:08
Code: mov ax,$0003 int 10h put this at the beginning, and try on XP |
|||
10 Apr 2006, 21:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.