flat assembler
Message board for the users of flat assembler.
Index
> Main > Tajga tutorials question. |
Author |
|
vid 12 Feb 2005, 18:11
Quote:
Yes, you can take it that way. Quote: (2)On tutorial #2: Of course, you can use "mov" instrcution with any register. Quote:
yes, again you can use any register this way. And in this case, after first instruction AL will hold value 5, after second instruciton (mov bl,al) BL will hold 5 too, and value of AL won't be modified (mov instruction only changes it's first argument), so it will be still 5. a), b). value in AH (2) identifies which service of DOS you wish. Service 2 is for printing single character, and if AL contains other number, then it calls other service of DOS. You can look at http://www.ctyme.com/intr/int-21.htm for list if DOS services In exmple c), you called service whose number is ASCII code of 'a' (in assemblers 'a' means ASCII value of character "a"). |
|||
12 Feb 2005, 18:11 |
|
Embrance 12 Feb 2005, 18:38
Thanks.I reply with more questions(if i have any.)
|
|||
12 Feb 2005, 18:38 |
|
Embrance 13 Feb 2005, 11:23
Quote: a), b). value in AH (2) identifies which service of DOS you wish. Service 2 is for printing single character, and if AL contains other number, then it calls other service of DOS. You can look at http://www.ctyme.com/intr/int-21.htm for list if DOS services Is there a zipped version of it or any other files with helpful info as this? |
|||
13 Feb 2005, 11:23 |
|
gumletis 13 Feb 2005, 12:27
there is alot of interrupts, its take years for just getting they most to know, i only know like 10-20, and can remember 7 lol, but there is also 21/9, that print out a whole string out on the screen, and stop printing when its get the symbol '$' so if you have a msg with this is in it msg db 'hello world$forfun',0 it will print out 'hello world'... Let me give you some examples..
21/9 takes dx and print out until $ is meet in the string Code: org 0x100 ; this just start a normal com file(all hexedecimal can be used with fx 0x100/100h/$100 in fasm - donno others mov dx,msg ; mov msg to dx register mov ah,0x9 ; mov 0x9 to ah register, can also be of course 9/09h int 0x21 ; this is the one there start the full thing, this "int" means that its start a interrupt, i think almost all interrupts checks ah register for services number, and this is 0x9(print out dx until $ is meeted) and its called 21/9 or 21h/09h RET ; return to OS, there is also a interrupt for this i think its ; mov ah,0x4c ; int 0x21 ; but im not suree so there is one there copy the command line arguments to the dx register Code: org 0x100 mov dx,0x82 ; copy 0x82 to dx, 0x82 is the command line address mov ah,0x9 ; if you don't understand this, READ THE FIRST CODE! int 0x21 ; And if you don't know this lol read the first RET ; SAME HERE this print out the command line arguments, so lets say it called "print.com" so you want fx to print out "hello world, i hate you" so you do like this "print.com hello world, i hate you$" its importen with the '$' if you don't have that, it will print out the whole program there is under address 0x82, and that would beep a lot (becuase all ascii(American Standard Charactors blah blah some more, can't remember ) charactors from 1-31 have something special to do, number 7 is a beep, number 1 is a simley, and so off. www.asciitable.com good site for ascii symbols... And wanna show you one more interrupt, theres called 16/0 its used for input a charectors, can also be used for a "stop until key pressed" thing(i use i almost only to that) its easy to do, a example here Code: org 0x100 mov dx,0x82 mov ah,0x9 int 0x21 ; thats the other code, now to the new one mov ah,0x0 int 0x16 ; if you guess it would be so easy, your right! ; i use this, but instead of the mov ah,0x0 almost all use xor ah,ah its just move the 0 to ah, as before you can also do like this mov ah,0 or mov ah,0h you choose!. RET Now i don't wanna boring your mind with asm information right now _________________ LOOOL |
|||
13 Feb 2005, 12:27 |
|
vid 13 Feb 2005, 13:21
emrance: search for "ralf brown interrupt list"
|
|||
13 Feb 2005, 13:21 |
|
Embrance 14 Feb 2005, 02:00
|
|||
14 Feb 2005, 02:00 |
|
Embrance 19 Feb 2005, 07:38
Heres another question:Can i store into a register multiple values?
Example: mov al,10 mov al,20 Will al hold both 10 and 20? |
|||
19 Feb 2005, 07:38 |
|
Tommy 19 Feb 2005, 08:36
No, you can't... The second instruction will alter the contents of the AL-register
|
|||
19 Feb 2005, 08:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.