HLA程序在macOS High Sierra上与“Segmentation fault:11”崩溃

时间:2018-03-09 07:52:05

标签: macos hla

我正在尝试在MacOS High Sierra Vesion 10.13.3上运行一个简单的HLA(高级程序集)程序。我只是在尝试运行程序时在命令行上收到“Segmentation fault:11”。

./ x

program x ;
#include ( "stdlib.hhf" )
#include ( "args.hhf" )
static

argCount : int32 ;

begin x ;

arg.c();    // call the procedure to fetch the command line args:
// (this will put the argument count in eax)
stdout.put( "Number of arguments: ", (type uns32 eax), nl );
// to process individual argments, put the number of command line args
// in the edx register.
// set up ecx to count the args displayed, compare with edx
mov( eax, edx );
// call arg.v(num of arg) to put string's addr in eax for display
for( mov( 0, ecx ); ecx < edx; inc( ecx )) do
    arg.v(ecx);
    stdout.put( "at address: ",  eax, " "  );
    stdout.put( "arg[", (type uns32 ecx), "]=  ", (type string eax), nl );
endfor;
end x ;

这个程序似乎在Windows上运行良好,但我真的希望能够在Mac上运行它。任何帮助是极大的赞赏。

0 个答案:

没有答案