flat assembler
Message board for the users of flat assembler.
Index
> DOS > Help With Input |
Author |
|
DOS386 22 Mar 2007, 05:33
Quote:
Definitely YES. Quote: is there some special way I can move ax into a DB variable Is there some special way how to store 16 gallons of trinitroglycerole into a 8 gallons bottle ? Probably NO, silly idea, doesn't fit Quote:
Strange. Something must have happened 1 hour ago Try: Code: mov ah,2 mov dl, 8 int $21 mov dl, ' ' int $21 mov dl, 8 int $21 _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
22 Mar 2007, 05:33 |
|
Jakevfr 22 Mar 2007, 14:48
Thanks
|
|||
22 Mar 2007, 14:48 |
|
bsc021 19 Apr 2007, 19:43
I am doing a project and would like you to post a working input code.
I need to input two numbers to be multiplied and then give the output. -Thanks |
|||
19 Apr 2007, 19:43 |
|
Jakevfr 04 May 2007, 02:50
I will once I get back to my computer with all that stuff on it.
Sorry for not replying sooner, been busy and haven't made it to the forums in a while :/ |
|||
04 May 2007, 02:50 |
|
Jakevfr 04 May 2007, 02:56
Alright here is the code I have... updated to. I'm not sure if this code is better, but it removes the need for a variable making it smaller, which I like.
Just call geti and ax will contain the number inputed. Code: geti: xor ax,ax push ax call getc cmp al,'-' jne ooops mov cx,1 call putc call getc ooops: call putc cmp al,13 je .exit sub al,0x30 xor dx,dx mov dl,al pop ax add ax,dx push ax .getii: call getc call putc cmp al,13 je .exit sub al,0x30 xor dx,dx mov dl,al pop ax imul ax,10 add ax,dx push ax jmp .getii .exit: pop ax cmp cx,1 jne noneg neg ax noneg: push ax mov al,10 call putc pop ax ret getc: xor ax,ax int 0x16 ret putc: mov ah,0x0e int 0x10 ret EDIT: Added PutC, I knida forgot it |
|||
04 May 2007, 02:56 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.