flat assembler
Message board for the users of flat assembler.
Index
> DOS > garbage and beeping PC speaker |
Author |
|
LocoDelAssembly 30 Jul 2009, 16:59
mov ax, myString -> mov ax, text
That will fix the issue. mov ah, 4ch mov al, 00h Could be just mov ax, 4c00h. |
|||
30 Jul 2009, 16:59 |
|
herbally 30 Jul 2009, 22:26
thanks Loco....that did resolve the issue. I'm curious though....what if I had multiple string variables in the text segment? How would the program know which one I am referring to?
Thanks again! |
|||
30 Jul 2009, 22:26 |
|
LocoDelAssembly 31 Jul 2009, 05:30
herbally, not sure what you mean but if you are referring to something like this:
Code: segment text string1 db "hello", "$" value dw $1234 Then this should work: Code: mov ax, text mov ds, ax ; This shouldn't be done again unless you need to switch to a different data segment and it is not suitable for you using ES segment. mov cx, [value] ; CX = 1234h mov dx, myString ; DX = myString's offset inside "text" segment |
|||
31 Jul 2009, 05:30 |
|
herbally 31 Jul 2009, 15:46
To begin with I'm a self-taught VB.NET programmer so my logic as it pertains to assembly is all messed up!
Apparently I was just confused about a very basic part of ASM. I went back and re-read some of the documentation and figured out the answer to my question. Thanks again for your assistance! |
|||
31 Jul 2009, 15:46 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.