Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fxlib.h>
- void PrintInt(int n) {
- unsigned char str[12] = "0";
- int i, l=0;
- if(n) {
- if(n<0) {
- str[0] = '-';
- l++;
- n *= -1;
- }
- for(i=n ; i ; i/=10)
- l++;
- str[l] = 0;
- for(i=n ; i ; i/=10)
- str[--l] = i%10 + '0';
- }
- Print(str);
- }
- void PrintIntHex(unsigned int n) {
- char str[11] = "0x";
- int i;
- for(i=0 ; i<8 ; i++) {
- str[9-i] = (n&15) + ((n&15)>9 ? 'A'-10 : '0');
- n >>= 4;
- }
- Print(str);
- }
- int AddIn_main(int isAppli,unsigned short OptionNum) {
- int key, i;
- i = 123456789;
- locate(1, 1);
- PrintInt(i);
- locate(1, 2);
- PrintIntHex(i);
- GetKey(&key);
- return 1;
- }
- #pragma section _BR_Size
- unsigned long BR_Size;
- #pragma section
- #pragma section _TOP
- int InitializeSystem(int isAppli,unsigned short OptionNum)
- {
- return INIT_ADDIN_APPLICATION(isAppli,OptionNum);
- }
- #pragma section
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement