line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Language::Zcode::Util;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings;
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
68
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
17
|
use Exporter;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
93
|
|
7
|
2
|
|
|
2
|
|
12
|
use vars qw(@EXPORT @ISA %Constants @Memory);
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
401
|
|
8
|
|
|
|
|
|
|
@ISA = qw(Exporter);
|
9
|
|
|
|
|
|
|
@EXPORT = qw(%Constants @Memory);
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Utilities used both by parser and translator
|
12
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
0
|
49
|
sub get_byte_at { $Memory[$_[0]]; }
|
14
|
2
|
|
|
2
|
0
|
8
|
sub set_byte_at { $Memory[$_[0]] = $_[1]; }
|
15
|
20
|
|
|
20
|
0
|
73
|
sub get_word_at { 256*$Memory[$_[0]] + $Memory[$_[0]+1]; }
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1;
|