Search
Articles & Documents
Tutorials
Newsletter
CPDB.Net
Friends News
Visits
Webmaster - Infos
|
- Forum - ppCompiler
Topic # 55 |
TP Exit procs |
03/12/2012 @ 13:42 by orlp
|
On my palm I used two short inline procedures written by Philippe to implement Turbo Pascal's exit and halt. Of course they use Motorola instructions. Can you tell me the corresponding ARM instructions. The Motorola versions are: procedure exit; inline($4e5e,$4e75); procedure halt; inline($2c6d,32,$4e5e,$4e75);
Alternatively I suppose I could use goto + label at the end of the procedure or program.
AfrikaansAlbanianArabicArmenianAzerbaijaniBasqueBelarusianBulgarianCatalanChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDetect languageDutchEnglishEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRom anianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishThaiTurkishUkrainianUrduVietnameseWelshYiddish⇄AfrikaansAlbanianArabicArmenianAzerbaijani BasqueBelarusianBulgarianCatalanChinese (Simplified)Chinese (Traditional)CroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGeorgianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatinLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRom anianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishThaiTurkishUkrainianUrduVietnameseWelshYiddishEnglish (auto-detected) » English
Oliver Pretzel
|
|
|
Answer n° 1 -------- 03/12/2012 @ 13:51 by Philippe
visitor |
Of course, you can use a goto instruction, but the procedure halt that stops the program is predefined : procedure
halt(output_code:integer); |
|
|
Answer n° 3 -------- 04/12/2012 @ 19:21 by Philippe
visitor |
There is no easy way to define an "exit" procedure, even with inline assembler. I plan to add it in a future version. Waiting his time, you may try this : procedure brol; label 10; procedure exit; begin goto 10; end; begin // of procedure brol
... exit; // anywhere
...
10: end;
Philippe |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|