tag:blogger.com,1999:blog-650001352631255056.post4385184818371876682..comments2023-04-26T16:29:19.087+02:00Comments on System Programming: Simple Virtual MachineAlexey Lyashkohttp://www.blogger.com/profile/13663908781307440762noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-650001352631255056.post-15573553326114465682014-04-23T00:35:24.062+03:002014-04-23T00:35:24.062+03:00Well, values are stored in the file, in its header...Well, values are stored in the file, in its header, meaning sizeof(VM_HEADER) first bytes. These bytes are read into the vmh variable. That's it.<br /><br />However, if your question is how those fields are populated, then take a look at the asm source. It is quite self explanatory.Alexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-12876179397566261242014-04-22T11:44:35.612+03:002014-04-22T11:44:35.612+03:00If I understand it properly, vcpu_load opens the b...If I understand it properly, vcpu_load opens the bin file and reads it, then uses it to fully initialise the values of a VM_HEADER struct (vmh). I have tried opening and reading the bin file to see how the values for each field of the header are decided, to no success. How is this step done?<br /><br />Thank you very much for the answer!Anonymoushttps://www.blogger.com/profile/17799286469807967461noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-9334707944315966502014-04-18T16:39:51.945+03:002014-04-18T16:39:51.945+03:00Not as active as I would like to be, but still her...Not as active as I would like to be, but still here. Go on shoot your questionAlexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-69450297197314334272014-04-18T12:04:48.243+03:002014-04-18T12:04:48.243+03:00I suppose I'm late commenting, but in case the...I suppose I'm late commenting, but in case the author is still active, I would like to ask for an insight of the bin file. It's the only thing I don't fully understand how it works!Anonymoushttps://www.blogger.com/profile/17799286469807967461noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-53969980607984979522014-01-21T14:30:36.509+03:002014-01-21T14:30:36.509+03:00Oh my GOD it's Wonderful Please keep sharingOh my GOD it's Wonderful Please keep sharing Jacklapotthttps://www.blogger.com/profile/01046130348671072314noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-64422894479335734302013-08-28T09:05:22.717+03:002013-08-28T09:05:22.717+03:00This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/09701377984223022528noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-66982323198077197932012-11-02T18:16:20.650+03:002012-11-02T18:16:20.650+03:00Thanks Carlos :)
Working on another article from ...Thanks Carlos :)<br /><br />Working on another article from VM seriesAlexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-6355029347502371762012-11-02T16:03:45.847+03:002012-11-02T16:03:45.847+03:00Hi Alexey,
nice job, nice article, good points......Hi Alexey,<br /><br />nice job, nice article, good points..... please, keep posting good and relevant material.<br /><br />Regards,<br />Carlos PrattiAnonymoushttps://www.blogger.com/profile/07038663847012978976noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-77970749841242746702012-02-16T06:39:23.185+03:002012-02-16T06:39:23.185+03:00I understand your pointI understand your pointAlex Nikhttps://www.blogger.com/profile/00254630906372547501noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-69023610636339031072012-02-15T22:30:43.313+03:002012-02-15T22:30:43.313+03:00I am afraid I missed the point. Do you mean to let...I am afraid I missed the point. Do you mean to let the VM access "real" memory? If so, then there's no difference as you still have to parse the instruction and access the memory from your code, not from VM'sAlexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-31743749426474699432012-02-15T21:36:48.132+03:002012-02-15T21:36:48.132+03:00=) maybe I think a little ahead, to map a region o...=) maybe I think a little ahead, to map a region of memory from host to VM =) but in this case, you are rightAlex Nikhttps://www.blogger.com/profile/00254630906372547501noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-19178238906399187292012-02-14T16:40:19.658+03:002012-02-14T16:40:19.658+03:00Pointers are 64 bit on 64 bit platforms, but this ...Pointers are 64 bit on 64 bit platforms, but this does not affect the size of the values they point at. stackBase points at an allocated array of 32 bit values, therefore, it is unsigned int *stackBaseAlexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-67933095772467316072012-02-14T14:47:36.764+03:002012-02-14T14:47:36.764+03:00Maybe I'm late, but looks like
unsigned in...Maybe I'm late, but looks like<br /> unsigned int *stackBase;<br />is not quite correctly, bcoz pointer in 64 bit arch is 64 bit and in my mind you should write<br /> unsigned long *stackBase;Alex Nikhttps://www.blogger.com/profile/00254630906372547501noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-33099088739373182942012-01-27T20:01:19.860+03:002012-01-27T20:01:19.860+03:00Thanks for the comment!
Let me know if you need an...Thanks for the comment!<br />Let me know if you need any explanation or clarification.Alexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-78939771963209490332012-01-27T19:00:42.365+03:002012-01-27T19:00:42.365+03:00Maybe I have to go over it again once more, specia...Maybe I have to go over it again once more, specially with all the assembly codes. It went way above my head. But thanks for sharing.Server Dealerhttp://serverbestdeal.com/noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-78776009300983725512011-12-26T17:12:50.798+03:002011-12-26T17:12:50.798+03:00Thank you for good words, Dr James. I have sent yo...Thank you for good words, Dr James. I have sent you an email as you requested.Alexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-71787350600009374642011-12-26T12:51:38.050+03:002011-12-26T12:51:38.050+03:00Hi
Nice article
Can you contact me (Dr Mike James...Hi <br />Nice article<br />Can you contact me (Dr Mike James)<br />editor@i-programmer.info<br />Thanksmikejhttps://www.blogger.com/profile/09320354275958914874noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-28278790057397668442011-12-23T11:07:53.316+03:002011-12-23T11:07:53.316+03:00Actually, as long as they are not made public (e.g...Actually, as long as they are not made public (e.g. exported), I do not see any problem with that. In addition, we may simply remove all identifiers following the struct keyword, as we are defining types here.Alexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-23215138916979838022011-12-23T08:38:10.608+03:002011-12-23T08:38:10.608+03:00Cool article! But fyi, underscore-capital identifi...Cool article! But fyi, underscore-capital identifiers, like _VM, are reserved for the compiler in C and C++.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-24407143541484787962011-12-23T00:09:46.246+03:002011-12-23T00:09:46.246+03:00thanks! will do my best not to disappoint ;)thanks! will do my best not to disappoint ;)Alexey Lyashkohttps://www.blogger.com/profile/13663908781307440762noreply@blogger.comtag:blogger.com,1999:blog-650001352631255056.post-52293598331336199462011-12-23T00:06:04.142+03:002011-12-23T00:06:04.142+03:00keep sharing, you have some great posts, thx :))keep sharing, you have some great posts, thx :))Anonymoushttps://www.blogger.com/profile/05210207343245658941noreply@blogger.com