Home | History | Annotate | Download | only in perlasm

Lines Matching full:line

22 # - can't use multiple ops per line;
79 local *line = shift;
82 if ($line =~ /^([a-z][a-z0-9]*)/i) {
85 $line = substr($line,@+[0]); $line =~ s/^\s+//;
135 local *line = shift;
138 if ($line =~ /^\$([^,]+)/) {
141 $line = substr($line,@+[0]); $line =~ s/^\s+//;
163 local *line = shift;
166 if ($line =~ /^([^\(,]*)\(([%\w,]+)\)/) {
171 $line = substr($line,@+[0]); $line =~ s/^\s+//;
229 local *line = shift;
232 if ($line =~ /^%(\w+)/) {
236 $line = substr($line,@+[0]); $line =~ s/^\s+//;
263 local *line = shift;
266 if ($line =~ /(^[\.\w]+\:)/) {
269 $line = substr($line,@+[0]); $line =~ s/^\s+//;
303 local *line = shift;
306 if ($line =~ /(^[^,]+)/) {
309 $line = substr($line,@+[0]); $line =~ s/^\s+//;
323 local *line = shift;
336 if ($line =~ /^\s*(\.\w+)/) {
339 $line =~ s/\@abi\-omnipotent/\@function/;
340 $line =~ s/\@function.*/\@function/;
341 if ($line =~ /\.picmeup\s+(%r[\w]+)/i) {
343 } elsif ($line =~ /\.asciz\s+"(.*)"$/) {
345 } elsif ($line =~ /\.extern/) {
348 $self->{value} = $line;
350 $line = "";
357 $line = substr($line,@+[0]); $line =~ s/^\s+//;
370 /\.extern/ && do { $self->{value} = "EXTRN\t".$line.":BYTE"; last; };
371 /\.globl/ && do { $self->{value} = "PUBLIC\t".$line; last; };
372 /\.type/ && do { ($sym,$type,$narg) = split(',',$line);
390 /\.align/ && do { $self->{value} = "ALIGN\t".$line; last; };
392 && do { my @arr = split(',',$line);
406 /\.picmeup/ && do { $self->{value} = sprintf"\tDD\t 0%Xh,090000000h",$opcode{$line};
409 /\.asciz/ && do { if ($line =~ /^"(.*)"$/) {
423 $line = "";
434 while($line=<>) {
436 chomp($line);
438 $line =~ s|[#!].*$||; # get rid of asm-style comments...
439 $line =~ s|/\*.*\*/||; # ... and C-style comments...
440 $line =~ s|^\s+||; # ... and skip white spaces in beginning
448 if ($label=label->re(\$line)) { print $label->out(); }
450 if (directive->re(\$line)) {
452 } elsif ($opcode=opcode->re(\$line)) { ARGUMENT: {
454 if ($src=register->re(\$line)) { opcode->size($src->size()); }
455 elsif ($src=const->re(\$line)) { }
456 elsif ($src=ea->re(\$line)) { }
457 elsif ($src=expr->re(\$line)) { }
459 last ARGUMENT if ($line !~ /^,/);
461 $line = substr($line,1); $line =~ s/^\s+//;
463 if ($dst=register->re(\$line)) { opcode->size($dst->size()); }
464 elsif ($dst=const->re(\$line)) { }
465 elsif ($dst=ea->re(\$line)) { }
486 print $line,"\n";