flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
okasvi 29 Sep 2006, 18:25
...
myarray db 0, 27, "1", "2", "3" ![]() |
|||
![]() |
|
rhyno_dagreat 29 Sep 2006, 21:19
Umm... and I'd access each individual byte by doing "myarray + n", right?
|
|||
![]() |
|
LocoDelAssembly 29 Sep 2006, 23:38
Since it's a byte array yes, (symbol+elementNumber) is enough but for general accessing is (symbol+elementNumber*sizeOfElement).
|
|||
![]() |
|
Dex4u 30 Sep 2006, 00:41
You could do something like this pseudo code
Code: xor eax,eaxin al,0x60; do some test here for ctrl etcmov [ScanCode],al ;al = scan codemov edi,eax;Convert to ASCIImov al,[edi+normal_keymap] ; normal_keymap = address of array |
|||
![]() |
|
rhyno_dagreat 30 Sep 2006, 03:08
I think I get it, thanks... but why copy al to scan code?
|
|||
![]() |
|
Dex4u 30 Sep 2006, 03:37
rhyno_dagreat wrote: I think I get it, thanks... but why copy al to scan code? So you can put it in ah at the end of the function, like this Code: mov al,[keybuffer] ; this has the ASCII mov ah,[ScanCode] ;this has the scan code |
|||
![]() |
|
rhyno_dagreat 30 Sep 2006, 03:49
Oh, I see now... thanks!
|
|||
![]() |
|
Niels 30 Sep 2006, 13:39
Hello rhyno_dagreat,
This downloadable booklet has [one] or [two] things on arrays: http://www.drpaulcarter.com/pcasm/index.php |
|||
![]() |
|
rhyno_dagreat 30 Sep 2006, 18:03
Hey, thanks Niels! I believe I've read some of that book before, and it helped me a little while ago. I knew arrays were groups of variables one after another in memory, but I didn't know you could access 'em the way they are said to be able to be accessed in these other languages (if what I said makes any sense
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.