flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > virtual |
Author |
|
Coddy41 04 Jan 2010, 00:16
virtual? do you meen virtual8086? or do you meen this? http://en.wikipedia.org/wiki/Virtual_%28computing%29 Or something I have never heard of?
Any details? maybe copy and paste a paragraph out of manual? define "virtual" there are may terms :/ _________________ Want hosting for free for your asm project? You can PM me. (*.fasm4u.net) |
|||
04 Jan 2010, 00:16 |
|
GhostXoPCorp 04 Jan 2010, 00:17
virtual as in
virtual at bx LDT_limit dw ? LDT_address dd ? end virtual i have a feeling it defines the two variables with in bx? |
|||
04 Jan 2010, 00:17 |
|
Coddy41 04 Jan 2010, 00:56
Well if you go here, http://flatassembler.net/docs.php?article=manual
you will find this: Quote:
Basicly... IF I understand it correctly... if you use something like this Code: virtual at bx LDT_limit dw ? LDT_address dd ? end virtual Then if we use code that needs those values, They are already defined, but the code up there is not included in the binary its self. You may want to wait for someone that knows more about in than me. _________________ Want hosting for free for your asm project? You can PM me. (*.fasm4u.net) |
|||
04 Jan 2010, 00:56 |
|
GhostXoPCorp 04 Jan 2010, 03:03
lol no offense, but why did u post?? lol im kiddin, thanks anyway. good luck with your pmode os
_________________ Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me. |
|||
04 Jan 2010, 03:03 |
|
dosin 04 Jan 2010, 05:54
Quote: with a tutorial i am looking at a great person gave me, had virtual in it Is this tutorial writen in masm,fasm,nasm,C/C++,java,C# or any other language? do you have an example of how they used it? I have not used in fasm.. but according to the manual. can be used as a union : A Union is like a structure, except that each element shares the same memory or in your example the values assigned to LDT_limit dw ? and LDT_address dd ? will be treated as: mov ax,[bx] when its assembled..! So when its assembled and runs across: mov ax,[LDT_limit] instead of pointing/fetching the value at its location in memory were the value is stored.. Fasm will assign bx the value/s every time u use [LDT_limit] in the defined virtual function... creating a virtual address for the value/s defined... in the case of an ldt and limit... The address of the ldt followed by the limit are both loaded into bx or at least thats what I get from it... Last edited by dosin on 04 Jan 2010, 07:37; edited 2 times in total |
|||
04 Jan 2010, 05:54 |
|
GhostXoPCorp 04 Jan 2010, 06:39
thats what i thought as well, thank u very much
_________________ Oh that divide overflow. Just jumps out of the bushes every time to scare the day lights out of me. |
|||
04 Jan 2010, 06:39 |
|
sinsi 04 Jan 2010, 07:07
If you use 'virtual at ebx' then fasm will assume that ebx is a valid pointer, since it gets treated as '[ebx+something]'.
|
|||
04 Jan 2010, 07:07 |
|
Tyler 04 Jan 2010, 23:46
I got this from one of the 512 os comps, says it's by Privalov. Anyway, it uses "virtual", I have no idea how virtual works but here it is.
|
|||||||||||
04 Jan 2010, 23:46 |
|
LocoDelAssembly 05 Jan 2010, 00:03
Quote:
Indeed he is, he probably is best known as the fasm author |
|||
05 Jan 2010, 00:03 |
|
Tyler 05 Jan 2010, 00:21
Quote:
Wait, there's more than one author of Fasm(not that I would be surprised, it's a huge, complicated project)? Or, is Privalov Thomasz' alias? |
|||
05 Jan 2010, 00:21 |
|
LocoDelAssembly 05 Jan 2010, 00:26
Its Tomasz's nick, although I'm not sure if he is still using it.
|
|||
05 Jan 2010, 00:26 |
|
Borsuc 05 Jan 2010, 17:21
virtual makes an address space at the value specified by "at".
virtual is used ONLY to define FASM constants, it does NOT put any code or data in the output, that's why it's called virtual. example: Code: virtual at 5 db '6' somelabel: end virtual somelabel would be equal to 6, since '6' takes 1 byte. The code above is equal to: Code: somelabel = 6 you know how "org" works right? Virtual is the same thing except that everything inside it gets scrapped and is not output... only FASM constants survive. i.e Code: org 5 db '6' somelabel: it does, however, put the data you define in a temporary virtual block -- you can use "load" and "store" with it, but after 'end virtual' the data gets scrapped. and only the FASM constants survive. |
|||
05 Jan 2010, 17:21 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.