flat assembler
Message board for the users of flat assembler.
Index
> DOS > ip:cs? |
Author |
|
rCX 13 Dec 2008, 00:48
Are you trying to set cs=ip? I don't think it is possible (easily). ip and cs can only be changed by instructions like jmp or call.
There are other ways to store the user input. Have you tried? Code: push word seg ;\ds = segment pop word ds ;/ mov dx,off ; dx = offset mov ah,0Ah ;\Put user input at seg:off int 21h ;/ Can you give more information? Also, welcome to the fasm fourm! |
|||
13 Dec 2008, 00:48 |
|
GhostXoPCorp 13 Dec 2008, 02:25
well, not exactly i just want to know how it works, and how to make it what i want like say, i want tit to be cs: something
how to make it what i want it to be. and thank you for the welcome im sure this cite will help me with many questions, i just hope every one can put up with all of them, Ha Ha _________________ Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me. |
|||
13 Dec 2008, 02:25 |
|
rCX 13 Dec 2008, 03:24
GhostXoPCorp wrote:
Yeah, I once was a newbie. I still am, as compared to the fasm veterens. Like this? Code: push cs ;\ds = cs pop ds ;/ mov dx,off ; dx = offset mov ah,0Ah ;\Put user input at ds:off, which is the same as cs:off because ds=cs int 21h ;/ |
|||
13 Dec 2008, 03:24 |
|
GhostXoPCorp 13 Dec 2008, 03:29
well, here is what im wanting to do
i have the get key and it gets the key untill the user hits enter or i think cmp al, 13 now how can i store each letter and where untill the user hi enter, and then how can i check the string for if say the string says help je help, maybe OT, but this is all i need to know. it took me a while to under stand print (yeah ok, pathetic) but it was becase i defined in the wrong place and did not use certain ret's and other things. _________________ Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me. |
|||
13 Dec 2008, 03:29 |
|
rCX 13 Dec 2008, 04:08
A great resource for what interrupts do is Ralf Brown's Interrupt List. For the one used see here. Here is a list of 16-bit instructions. The cmpsb instruction is good for comparing strings.
Here's a better example because previous examples may not always work Code: org 100h use16 push cs ;\ds = cs pop ds ;/ mov dx,InputData ; dx = Address of InputData mov ah,0Ah ;\Waits for user to input string and puts it at ds:UserInput. Continues after enter is pressed. int 21h ;/ ;compare with InputString with 'help' using cmpsb. Sorry I don't have right now to to write it out ret InputData: MaxSizeAllowed db 255; Maximum size of string allowed InputStringLength db 255; Will contain length of input string after enter is pressed. For now it is 255 InputString rb 255; Reserve 255 bytes. Will contain string of input string after enter is pressed |
|||
13 Dec 2008, 04:08 |
|
GhostXoPCorp 13 Dec 2008, 04:33
thanks, but(i might have to post this when i join a cite) i have already downloaded ralphs list. if you could, tell evryone to stop asking me that. but any way, thanks i will use this. well i have to go, thank you for the info.
_________________ Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me. |
|||
13 Dec 2008, 04:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.