function LabelList=c31dskla(PrgFid, VadFid, InstructionsLine, LabelList);
% LabelList=c31dskla(PrgFid, VadFid, InstructionsLine);
% compiling mechanisms for labels

if strcmp(InstructionsLine(2),':'),                                  % is it a parametrizable label ?
 LabelName=InstructionsLine(3:length(InstructionsLine));
 fprintf(VadFid, ['_', LabelName, '	.word	', LabelName]);      % add the address of this label
 fprintf(VadFid, '	; address of %s\r\n', LabelName);            % in the vadfid
else  
 LabelName=InstructionsLine(2:length(InstructionsLine));
end;

% Is it one of the reserved labels for the interruption vectors ?
% If so, put the right jump at the right address
if strcmp(LabelName, 'int0'),
 fprintf(PrgFid, '\r\n; this program uses the int0 interruption\r\n');
 fprintf(PrgFid, '	.start "int0sect", 0x809FC1\r\n');
 fprintf(PrgFid, '	.sect  "int0sect"\r\n');
 fprintf(PrgFid, '	br int0\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'int1'),
 fprintf(PrgFid, '\r\n; this program uses the int1 interruption\r\n');
 fprintf(PrgFid, '	.start "int1sect", 0x809FC2\r\n');
 fprintf(PrgFid, '	.sect  "int1sect"\r\n');
 fprintf(PrgFid, '	br int1\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'int2'),
 fprintf(PrgFid, '\r\n; this program uses the int2 interruption\r\n');
 fprintf(PrgFid, '	.start "int2sect", 0x809FC3\r\n');
 fprintf(PrgFid, '	.sect  "int2sect"\r\n');
 fprintf(PrgFid, '	br int2\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'int3'),
 fprintf(PrgFid, '\r\n; this program uses the int3 interruption\r\n');
 fprintf(PrgFid, '	.start "int3sect", 0x809FC4\r\n');
 fprintf(PrgFid, '	.sect  "int3sect"\r\n');
 fprintf(PrgFid, '	br int3\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'xint0'),
 fprintf(PrgFid, '\r\n; this program uses the xint0 interruption\r\n');
 fprintf(PrgFid, '	.start "xint0sect", 0x809FC5\r\n');
 fprintf(PrgFid, '	.sect  "xint0sect"\r\n');
 fprintf(PrgFid, '	br xint0\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'rint0'),
 fprintf(PrgFid, '\r\n; this program uses the rint0 interruption\r\n');
 fprintf(PrgFid, '	.start "rint0sect", 0x809FC6\r\n');
 fprintf(PrgFid, '	.sect  "rint0sect"\r\n');
 fprintf(PrgFid, '	br rint0\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'xint1'),
 fprintf(PrgFid, '\r\n; this program uses the xint1 interruption\r\n');
 fprintf(PrgFid, '	.start "xint1sect", 0x809FC7\r\n');
 fprintf(PrgFid, '	.sect  "xint1sect"\r\n');
 fprintf(PrgFid, '	br xint1\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'rint1'),
 fprintf(PrgFid, '\r\n; this program uses the rint1 interruption\r\n');
 fprintf(PrgFid, '	.start "rint1sect", 0x809FC8\r\n');
 fprintf(PrgFid, '	.sect  "rint1sect"\r\n');
 fprintf(PrgFid, '	br rint1\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'tint0'),
 fprintf(PrgFid, '\r\n; this program uses the tint0 interruption\r\n');
 fprintf(PrgFid, '	.start "tint0sect", 0x809FC9\r\n');
 fprintf(PrgFid, '	.sect  "tint0sect"\r\n');
 fprintf(PrgFid, '	br tint0\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'tint1'),
 fprintf(PrgFid, '\r\n; this program uses the tint1 interruption\r\n');
 fprintf(PrgFid, '	.start "tint1sect", 0x809FCA\r\n');
 fprintf(PrgFid, '	.sect  "tint1sect"\r\n');
 fprintf(PrgFid, '	br tintt\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
elseif strcmp(LabelName, 'dint'),
 fprintf(PrgFid, '\r\n; this program uses the dint interruption\r\n');
 fprintf(PrgFid, '	.start "dintsect", 0x809FCB\r\n');
 fprintf(PrgFid, '	.sect  "dintsect"\r\n');
fprintf(PrgFid, '	br dint\r\n\r\n');
 fprintf(PrgFid, '	.text\r\n');
end;

fprintf(PrgFid, '%s	; %s\r\n', LabelName, InstructionsLine);     % ok, just write the label name in the program file
LabelList=[LabelList, LabelName, ' '];

