program attributeswrite; %include 'plib:zerofx'; var firqbchar origin 402B : packed array [0..37B] of char; firqbunsignedbyte origin 402B : packed array [0..37B] of 0..255; firqbsignedbyte origin 402B : packed array [0..37B] of -128..127; attributedata origin 413B : packed array [1..13] of char; asciidata : array [1..13] of integer; proj, prog, attributetype, i, error : integer; begin { main } repeat write('PPN? '); readln(proj,prog); write('Attribute number? '); readln(attributetype); writeln('Enter the 13 bytes of attribute blockette data.'); writeln(' Type the ASCII value for each byte, one byte per line.'); for i := 1 to 13 do begin write(' Byte #',i:3,'? '); readln(asciidata[i]) end; zerofirqb; for i := 1 to 13 do attributedata[i] := chr(asciidata[i]); firqbsignedbyte[3B] := -31B; { uu.atr } firqbsignedbyte[4B] := -2; { subfunct. code: -1=read, -2=write, -3=delete } firqbunsignedbyte[5B] := attributetype; { 5=lastname, 205=first } firqbunsignedbyte[6B] := prog; firqbunsignedbyte[7B] := proj; emt(377B); emt(66B); { .uuo } error := firqbunsignedbyte[0B]; writeln('Error code = ',error:1); writeln until false end. { main }