Should do fine imo, except for one thing: MessageBoxA is an
API function, hence it uses PChar and not Delphi's internal string. You should pass a pointer to the first character instead of the string itself.
I'm not sure about the PushAd and PopAd stuff - I think it's for
exception handling, isn't it? I can't tell if you're using those instructions correctly because I've never used them myself, but I think the easiest way to find that out is to just run the code and see if it works.