Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A test in Pascal (FPC) for some low level. I'm looking to know how to translate it into C and _asm
{$IFDEF FPC}{$GOTO ON}{$asmmode att}{$ENDIF}
program asm_code;
label a_label;
label _end;
var i : integer;
begin
writeln('a_label address: ', HexStr(PtrUInt(@a_label), 32));
i := -10;
a_label:
writeln(i:3,' in a_label');
asm
inc i
cmpw $10,i
jle a_label
end;
_end:
writeln('Bye');
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.