Оберон-клуб «ВЄДАsoft»

Твердыня модульных языков
Текущее время: 28 мар 2024, 20:25

Часовой пояс: UTC + 2 часа




Начать новую тему Ответить на тему  [ Сообщений: 5 ] 
Автор Сообщение
 Заголовок сообщения: innapropriate symbol file
СообщениеДобавлено: 14 авг 2017, 17:12 
Не в сети

Сообщения: 104
i am importing this mod file:
Код: "OBERON"
  1.  
  2. MODULE MapSquares;
  3.  
  4.  
  5. IMPORT B:=Basic;
  6. VAR
  7. SquareOccupied*:ARRAY 32,24 OF SHORTINT;
  8. SquareNumber*:ARRAY 32,24 OF SHORTINT;
  9. SquareType*:ARRAY 32,24 OF SHORTINT;
  10. xiter:INTEGER;
  11. yiter:INTEGER;
  12.  
  13. BEGIN
  14. B.AT(3,0);
  15. B.PRSTR("Mapsquares");
  16. FOR xiter:=0 TO 31 DO
  17. FOR yiter:=0 TO 23 DO
  18. SquareOccupied[xiter][yiter]:=0;
  19. SquareNumber[xiter][yiter]:=0;
  20. SquareType[xiter][yiter]:=0;
  21. END;
  22. END;
  23.  
  24.  
  25. END MapSquares.


here is the sym file:
Код: "OBERON"
  1.  
  2. ASxxxx Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180), page 1.
  3. Hexadecimal [16-Bits]
  4.  
  5. Symbol Table
  6.  
  7. .__.$$$. = 2710 L
  8. .__.ABS. = 0000 G
  9. .__.CPU. = 0000 L
  10. .__.H$L. = 0000 L
  11. _Basic_AT_ROM_callee **** GX
  12. _Basic_PRSTR_C_ROM_fastcall **** GX
  13. 1 _MapSquares_SquareNumber 0300 GR
  14. 1 _MapSquares_SquareOccupied 0000 GR
  15. 1 _MapSquares_SquareType 0600 GR
  16. 0 _MapSquares__init 0000 GR
  17. 1 _MapSquares_xiter 0900 R
  18. 1 _MapSquares_yiter 0902 R
  19. 0 ___str_0 00AA R
  20.  
  21.  
  22. ASxxxx Assembler V02.00 + NoICE + SDCC mods (Zilog Z80 / Hitachi HD64180), page 2.
  23. Hexadecimal [16-Bits]
  24.  
  25. Area Table
  26.  
  27. 0 _CODE size B5 flags 0
  28. 1 _DATA size 904 flags 0
  29. 2 _INITIALIZED size 0 flags 0
  30. 3 _DABS size 0 flags 8
  31. 4 _HOME size 0 flags 0
  32. 5 _GSINIT size 0 flags 0
  33. 6 _GSFINAL size 0 flags 0
  34. 7 _INITIALIZER size 0 flags 0
  35. 8 _CABS size 0 flags 8
  36.  
  37.  

when compiling ofront says the sym file is innapropriate and wont go any further.

The sym file was compiled:
ofront+ mapsquares.mod -e -s

there is a warning about missing the .par file


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: innapropriate symbol file
СообщениеДобавлено: 15 авг 2017, 10:52 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
slenkar, the thing is that SDCC also creates files with the .sym extension. And they have a format that is different from the files that the Ofront produces. So do not mix them together. I, for example, keep .sym-files separately from .c and .h. And I'm doing all the work with symbol files, generated by Ofront, in a separate folders /Sym and /Lib/Sym.

Be sure to use the correct Ofront.par. Look at ZXDev/Obj/Ofront.par - this is important for the correct compilation of your code.


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: innapropriate symbol file
СообщениеДобавлено: 15 авг 2017, 14:54 
Не в сети

Сообщения: 104
thanks that fixed it

I was using B.AT (the basic command) with integers a long time ago, but now it says it is incompatible

is there an int to char command?


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: innapropriate symbol file
СообщениеДобавлено: 16 авг 2017, 13:29 
Не в сети
Аватара пользователя

Сообщения: 1019
Откуда: Днепропетровская обл.
You don't need int to char command. Usually, in Oberon the type CHAR not used for working with numbers. Look at the definition of AT:

Код: "OBERON"
  1. DEFINITION Basic;
  2.  
  3. TYPE
  4. TextCoords* = SHORTINT;
  5.  
  6. PROCEDURE AT* (y, x: TextCoords);
So if you want to produce effective code, use the alias Basic.TextCoords (or the type SHORTINT directly) to work with text coordinates.

If you really need to pass an INTEGER value, use:
Код: "OBERON"
  1. Basic.AT(SHORT(intX), SHORT(intY));
But it will be less effective than using SHORTINT values.


Вернуться к началу
 Профиль  
Ответить с цитатой  
 Заголовок сообщения: Re: innapropriate symbol file
СообщениеДобавлено: 16 авг 2017, 13:33 
Не в сети

Сообщения: 104
thanks :D


Вернуться к началу
 Профиль  
Ответить с цитатой  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 5 ] 

Часовой пояс: UTC + 2 часа


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Создано на основе phpBB® Forum Software © phpBB Group
© VEDAsoft Oberon Club