PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

Where should the type information be 129


Your Ad Here

Your Ad Here

+--------------- Herein lies a big gap of something missing. The something missing is my lack of knowledge about how wires are wired. This multiply is an abstract to me because no print pops into my head. Note that if any print does pop into my head it will be wrong because I don't know enough about hardware. +---------------

Barb, this may help:

Where should the type information be 132
Trevor L. Jackson, III deletes that reliance If every file requires at least one datum block, there is an upper bound on the size of the directory (i-node space...

Suppose "Multiply" is a macro for "JSP P1, MULT..", which is defined as follows:

Where should the type information be 130
On Sat, 26 Mar 2005 16:52:32 GMT, "Stephen Fuld" Nit. That will work on an HP-48, but on an HP-35, the result will be a stack with 4 in the X register...
Where should the type information be 134
Nick Maclaren OK, under the clarified question the answer is yes, including unit record file systems supporting only fixed length records. So what? The definition of a file...

MULT..: POP P, T1 POP P, T0 IMUL T0, T1 PUSH P, T0 JRST (P1)

That is, in a stack machine, arithmetic operations pop their operands off the stack, do the operation, then push the results back on the stack.

On the PDP-10, of course, this is shorter:

MULT..: POP P, T1 IMULM T1, (P) JRST (P1)

Where should the type information be 133
don't count. Traditional mainframe systems (and VMS) do, in native mode (i.e. not in their POSIX environment, if any). Don't be silly. In MVS, VMS etc., the maximum length of...

-Rob

p.s. I once circa 1971 used the META-II compiler-compiler on the PDP-10 to hack up a quick&dirty BLISS compiler in a weekend. It really generated *terrible* code, but said code looked a lot like the kind of naive stack machine being talked about here except dumber!. That is, Stephan's stack-machine example, which in BLISS could be written as "A := (.B * .C) + (.D * .E);", came out of my toy compiler looking like this:

MOVEI T0, A ; (T0 is my compiler's "accumulator") PUSH P, T0 ; "Push address of A"

MOVEI T0, B LOAD T0, (T0) ; Do the "." PUSH P, T0 ; Result is same as Stephan's "PUSH B"

MOVEI T0, C LOAD T0, (T0) PUSH P, T0 ; "PUSH C"

POP P, T1 ; (T1 was the one & only "scratch register") POP P, T0 IMUL T0, T1 PUSH P, T0 ; "Multiply"

MOVEI T0, D LOAD T0, (T0) PUSH P, T0 ; "PUSH D"

MOVEI T0, E LOAD T0, (T0) PUSH P, T0 ; "PUSH E"

POP P, T1 POP P, T0 IMUL T0, T1 PUSH P, T0 ; "Multiply"

POP P, T1 POP P, T0 ADD T0, T1 PUSH P, T0 ; "Add"

POP P, T1 ; (Contains "addr(A)", remember?) POP P, T0 STOREM T0, (T1) ; "Pop A"

See? I *told* you the generated code was stupid... ;-}

p.p.s. The code generator popped binary ops' args into T1 first and *then* into T0 so that non-commutative operations like "Subtract" and "Divide" would work correctly.

p.p.s. Even a *very* simple peephole optimizer could have worked wonders on this code... (*sigh*) Probably resulting in something like this:

PUSH P, A LOAD T0, B IMUL T0, C PUSH P, T0 LOAD T0, D IMUL T0, E POP P, T1 ADD T0, T1 POP P, T1 STOREM T0, (T1)

----- San Mateo, CA 94403 (650)572-2607



Your Ad Here

List | Previous | Next

Where should the type information be 130

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

Where should the type information be 128