; > hello.mac ; ; Hello World for PDP-11 running Unix ORG 0 ; Position independant code EQUW &0107 ; Magic number &o000407, also branch to Startup EQUW CodeEnd-Startup ; size of text EQUW DataEnd-CodeEnd ; size of initialised data EQUW ObjectEnd-DataEnd ; size of uninitialised data EQUW &0000 ; size of symbol data EQUW &0000 ; entry point EQUW &0000 ; not used EQUW &0001 ; no relocation info ; ORG 0 ; Position independant code .Startup ; mov #1,r0 ; r0=STDOUT trap 4 ; write() equw hello ; Start of data equw hello_end-hello ; Length of data ; trap 1 ; exit() halt ; drop to monitor .hello equs "Hello world!",10,13 .hello_end align .CodeEnd .DataEnd .ObjectEnd