| 1 | package Language::Zcode::Util; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use Exporter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | ▶ | use vars qw(@EXPORT @ISA %Constants @Memory); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | @ISA = qw(Exporter); | |
| 9 | 2 | @EXPORT = qw(%Constants @Memory); | |
| 10 | |||
| 11 | # Utilities used both by parser and translator | ||
| 12 | |||
| 13 | 13 | ▶ | sub get_byte_at { $Memory[$_[0]]; } |
|
Subroutine
get_byte_at: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 2 | ▶ | sub set_byte_at { $Memory[$_[0]] = $_[1]; } |
|
Subroutine
set_byte_at: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | 20 | ▶ | sub get_word_at { 256*$Memory[$_[0]] + $Memory[$_[0]+1]; } |
|
Subroutine
get_word_at: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 16 | |||
| 17 | 2 | 1; | |