Recherche
Articles & Documents
Tutoriaux
Lettre d'information
CPDB.Net
Nouvelles des Amis
Visites
Webmaster - Infos
|
- Forum - ppCompiler
Sujet n° 55 |
TP Exit procs |
le 03/12/2012 @ 13:42 par 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
|
|
|
Réponse n° 1 -------- le 03/12/2012 @ 13:51 par Philippe
visiteur |
Of course, you can use a goto instruction, but the procedure halt that stops the program is predefined : procedure
halt(output_code:integer); |
|
|
Réponse n° 3 -------- le 04/12/2012 @ 19:21 par Philippe
visiteur |
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 |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|