全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Two-pass assembler, symbol table?

又称: two-pass assembler · symbol table

Definition 21.1 High School Computer Science · 第 21 章 — Project: An Assembler and Simulator for the Toy Machine

A two-pass assembler reads the program twice. The first pass computes the address of every line and records each label with its address in the symbol table; the second pass encodes every line, looking up in the table the labels used as operands.

The memory after assembling sum_array.toy: ten instructions of two bytes, then seven bytes of DATA. Each label of the symbol table points at an address; the rest of memory, from 27 to 255, is free, and the stack grows down from the top.
The memory after assembling sum_array.toy: ten instructions of two bytes, then seven bytes of DATA. Each label of the symbol table points at an address; the rest of memory, from 2727 to 255255, is free, and the stack grows down from the top.
在原文中阅读 →