z-logo
Premium
Converting a portable Pascal p‐code interpreter to a code generator
Author(s) -
Schneider Victor
Publication year - 1989
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380191108
Subject(s) - pascal (unit) , programming language , computer science , interpreter , compiler , arithmetic , subroutine , code (set theory) , mathematics , set (abstract data type)
This is a technical note that assumes reader familiarity with Pagan's paper on converting scaled down Pascal p‐code programming language interpreters into simple compilers. 1 This note discusses the extension of Pagan's methods to a full‐scale Pascal‐to‐C translator. In order to make procedure calls and typed function calls work properly for such a translator, it was found necessary to add type information to one of the p‐code calling instructions (and alter the Pascal‐to‐p‐code translator accordingly). A table of execution times for Pagan's ‘50 primes’ bench‐mark program shows the improvements obtained as a result of successive refinements in the Pascal‐to‐C translator, until the present version that uses C ‘register variables’ for integer arithmetic. 2 Programs compiled using this system can also be linked into C programs as functions or procedures and can be debugged using standard C debuggers.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here