flat assembler
Message board for the users of flat assembler.
Index
> DOS > key I/O.. |
Author |
|
michalll 04 Feb 2008, 18:37
Wouldn't it be easier using ah=10 and ah=9?
|
|||
04 Feb 2008, 18:37 |
|
abuashraf 05 Feb 2008, 00:42
I know that but I only want to use int 33,int 16h
|
|||
05 Feb 2008, 00:42 |
|
edfed 05 Feb 2008, 00:49
so, to memorise a sequence, two solutions:
a simple buffer, null terminated, to build an asciiZ string, and print it via int21h read the values on the text screen and transfert copy them to another location , screen or else. need to read the video memory @ 0B8000h linear. |
|||
05 Feb 2008, 00:49 |
|
abuashraf 05 Feb 2008, 01:06
My problem ,how to copy this chars to the buffer,and then after that
getting them one after another,and print them, would you please show me a simple code. |
|||
05 Feb 2008, 01:06 |
|
edfed 05 Feb 2008, 01:30
Code: org 100h xor cx,cx start: mov si,buffer xor ah,ah ;input from keyboard int 16h cmp al,0x0d ;is it enter je exit ;yes get out mov [si],al inc si cmp si,buffer+100h je @f dec si ; to force the string leng to 256 chars @@: call putc jmp start ;repeat exit: mov di,(80*xx+yy)*2 mov si,buffer call txt int 20h putc: push ax cx dx mov ah,2 mov dl,al int 21h pop dx cx ax ret txt: mov ax,0b800h mov es,ax mov ah,71h ; blue text on grey @@: mov al,[si] or al,al je .end inc si mov [es:di],al add di,2 jmp @b .end: ret buffer rb 100h ;to memorise up to 256 chars db 0 ; for asciiZ formating |
|||
05 Feb 2008, 01:30 |
|
Picnic 06 Feb 2008, 18:08
Hello abuashraf, these two links might help, it's about input and output string.
http://board.flatassembler.net/topic.php?t=316 http://board.flatassembler.net/topic.php?t=4338 Also see about INT 21h / AH=0Ah it's a fast way to input a string. |
|||
06 Feb 2008, 18:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.