Added section on Data Types

This commit is contained in:
Bobbi Webber-Manners 2018-05-01 21:08:00 -04:00 committed by GitHub
parent 82aec409d5
commit 5e19f57bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ Includes:
- [EightBall Compiler and Virtual Machine](#eightball-compiler-and-virtual-machine)
- [VM Internals](#vm-internals)
- [Interpreter/Compiler Internals](#interpreter--compiler-internals)
- [Data Types](#data-types)
- [Code Examples](#code-examples)
# Intro
@ -992,6 +993,16 @@ Another situation where address fixups are required is subroutine calls. When a
The final step of compilation involves iterating through the `callsbegin` list, looking up each subroutine name in the `subsbegin` list. If the name is found, then the dummy `$ffff` at the fixup address is replaced with the entry point of the filename. Otherwise a linkage error is (cryptically) reported.
# Data Types
A `byte` variable is one byte everywhere. A `word` variable is two bytes everywhere, except in the Linux interpreter (where is is 32 bit word, 4 bytes.)
| Platform | Size in Bytes |
|------------------|------------------|
|6502 Interpreter | word 2, byte 1 |
|6502 VM | word 2, byte 1 |
|Linux Interpreter | word 4, byte 1 |
|Linux VM | word 2, byte 1 |
# Code Examples
## Hello World