flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 03 Feb 2012, 18:51
So, you must first load the pointer from dsk into some register (it is assembly, not HLL).
Code: mov si, [dsk] mov ax, [si+disk.boot.sectorssize] Note that as long as .sectorsize is defined with "dw" you don't need to use "word" prefix. |
|||
![]() |
|
bubach 03 Feb 2012, 19:11
Doh, ok thanks! Is there any better way of doing it, to avoid always using a register? "[fd0.boot.fats_per_drive]" just looks so much better..
![]() Anyway, that explains why it worked to set address with variable, but not get content at the address - so thanks again! ![]() |
|||
![]() |
|
bubach 03 Feb 2012, 19:44
Ok, so I removed the "drv" variable to use esi as base instead, but now i can't do "mov edi, esi+disk.boot"... eh, so... should i mov esi to edi first, then add disk.boot? Or wth? Forgot how annoying assembly can be
![]() Seems to have worked, assembles at least, but the FAT12 and VFS driver is so full of dependencies towards each other that I can't even test it without being finished with almost all code... That should be a fun debug session. ![]() |
|||
![]() |
|
JohnFound 03 Feb 2012, 20:13
Your problems have nothing to do with "struc" and "virtual" directives.
You should read some assembly tutorial first. At least the chapter about addressing. Read Main FAQ - there are useful links to reading materials. |
|||
![]() |
|
bubach 03 Feb 2012, 21:36
It's not that bad, I'll figure it out
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.