[Vm-dev] Transitioning to Cog

K. K. Subramaniam kksubbu.ml at gmail.com
Thu Oct 7 02:14:34 UTC 2010


Eliot,

Very neat. Thanks.

It also needs to check for magic at offset 512 and recover from big endian 
encoding. See comment for readImageFromFileHe.... method in VMMaker:

---
This method detects when the image was stored on a machine with the opposite 
byte ordering from this machine and swaps the bytes automatically. 
Furthermore, it allows the header information to start 512 bytes into the file, 
since some file transfer programs for the Macintosh apparently prepend a Mac-
specific header of this size. Note that this same 512 bytes of prefix area could 
also be used to store an exec command on Unix systems, allowing one to launch 
Smalltalk by invoking the image name as a command.
---

Subbu


More information about the Vm-dev mailing list