English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 21 April 2022, 10:09   #1401
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 612
Quote:
Originally Posted by pipper View Post
Do those changes have an effect on regular programs that don’t specifically interact with the init stuff?
Also, do these individual sections offer better code pruning at link time (I.e. potentially smaller executables)?
If your program only uses provided libraries, then there is no difference. You can compile it as usual.

There should be no difference if you aren't using -noixemul. But my automated tests cover only a tad more than 0%.

If you are using -noixemul and feed the linker yourself then you have to add the endfile xcrt0.o

If you compile some libraries yourself, you might consider to recompile these.

You're able to create resident programs now using -noixemul. Note that you need the correct libraries (well that applies for all programs and isn't new):
  • Don't use normal libs for baserel or resident programs and vice versa.
  • Don't use normal libs for for programs using the fpu and vice versa.
  • Don't mix baserel and baserel32...
  • special variants for 68040/60 aren't mandatory but do avoid some fline emulation
Regarding section garbage collection:

The linker ld offers that feature but the amiga implementation was a do-nothing. I added an implementation which attempts to remove duplicate sections containg only a weak function - these are created for template and inline stuff - and maybe a tad more, but it's not a correct garbage collection.

There is room for improvements to create a correct gc implementation, which involves scanning all relocations, the exception stuff and god knows what else.
bebbo is offline  
Old 10 May 2022, 20:05   #1402
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 612
Find here updated binaries for gcc on AmigaOS: https://franke.ms/download/gcc68.lha

All these programs are compiled with
-Os -noixemul -m68040 -ffast-math -fomit-frame-pointer -resident32
and can be made resident now, maybe this gains some speed, maybe not. On WinUAE there is no difference if the programs are resident, and resident does not count the invokations properly /shrug.

I omitted some files, which are duplicates, so copy:
Code:
c++ to g++,  m68k-amigaos-c++ and m68k-amigaos-g++
gcc to m68k-amigaos-gcc-6.5.0b
m68k-amigaos-ld to ld
Assign GCC: to the install folder and add GCC:bin to the path.
The headers and libs can be taken from the "normal" amiga-gcc stuff.
Use a sufficient stack size - I'm using 100k.
The first invokation of gcc fails on my system... since it can't invoke cc1. All further attempts succeed...
bebbo is offline  
Old 11 May 2022, 10:43   #1403
Olaf Barthel
Registered User
 
Join Date: Aug 2010
Location: Germany
Posts: 311
Quote:
Originally Posted by bebbo View Post
Find here updated binaries for gcc on AmigaOS: https://franke.ms/download/gcc68.lha

All these programs are compiled with
-Os -noixemul -m68040 -ffast-math -fomit-frame-pointer -resident32
and can be made resident now, maybe this gains some speed, maybe not. On WinUAE there is no difference if the programs are resident, and resident does not count the invokations properly /shrug.
With WinUAE's JIT the difference may be hard to measure, given that it dynamically responds to what code is being executed as part of loading the executable. Switching off the JIT and maybe also enabling cycle-accurate CPU emulation might bring out the differences, but it will test one's patience

That said, there has to be a measurable difference in favour of making cc1/cc1plus resident as opposed to loading them from disk, even if that is a virtual disk which uses proper caching and also resides on an SSD, etc.

The dos.library LoadSeg() implementation is not processing load files as quickly as it perhaps should be doing. It reads the load file using buffered file I/O, using a 1024 byte buffer which will be refilled as needed. From this buffer it will copy the code and data into the respective segment list entries allocated for them, a maximum of 1024 bytes at a time, using a modest "move.l (a1)+,(a0)+" repeated for as many 32 bit words as are currently stored in the buffer. It literally copies one 32 bit word at a time, with no loop unrolling or anything else which would speed up this process.

For the cc1 command this means that some 11 MBytes of code are processed in a loop which reads chunks of 1024 bytes each and copies these, about 11,200 times. The same happens for the much shorter data hunk (barely 75 KBytes in size).

The real kicker is what happens with the relocation information which is applied to the code hunk. For cc1 more than 89,840 individual relocations need to be performed and the format in which these instructions are stored in the load file is not geared towards efficiency.

In a nutshell, the dos.library LoadSeg() implementation devolves into a series of complicated delay loops for a load file as large as the cc1 command

Not doing all of that for each invocation of cc1, etc. really should make a difference at that scale.
Olaf Barthel is offline  
Old 12 May 2022, 19:26   #1404
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 828
I can't seem to print floating point numbers with printf. This is the floattest.c program:
Code:
#include <stdio.h>
int main(void)
{
	printf("%f\n", 0.1);
	return 0;
}
I build it with the following command:
Code:
m68k-amigaos-gcc -O2 -ffast-math -save-temps -fomit-frame-pointer -noixemul -m68060 -m68881 -lm -Wl,-Map=floattest.map -o floattest floattest.c
I also uploaded the executable I built and the source files:
http://bszili.morphos.me/stuff/floattest.zip
It it just prints "%f" instead of the actual float value, so the format string is probably not recognized.
Do I have to link it with another library or the argument order in the command is wrong? I updated to the latest version of the toolchain before testing.
BSzili is offline  
Old 13 May 2022, 01:46   #1405
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 51
Posts: 681
I usually play with the order of -lm (i.e first in front of the objects, then after the objects). Sometimes it helps.
alkis is offline  
Old 13 May 2022, 05:59   #1406
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 828
Nice, that did the trick! I had to put -lm to the very end after the objects.
BSzili is offline  
Old 13 May 2022, 08:10   #1407
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 612
simply add -v and have a look (I stripped all non objects/libs):
Code:
 /opt/amiga/libexec/gcc/m68k-amigaos/6.5.0b/collect2 -o floattest /opt/amiga/m68k-amigaos/libnix/lib/ncrt0.o -lm floattest.o -( -lnix20 -lnixmain -lnix -lstubs -lamiga -lgcc -lm -l__m__ -) /opt/amiga/m68k-amigaos/libnix/lib/xcrt0.o
That's the order how ld links the executable. Every entry is visited once. Objects are included as provided. Libs are used to resolve not yet found symbols. The brackets define a loop, what's in the loop is searched again and again until no unresolved symbol was added.
Next thing to know is: there are two implementations of printf - one with floating point support in -lm and one without floating point support in -lnix. Follow the link order and you'll see that it's mandatory to specify the lib after the referring object.
Usually libs are built in a way to avoid picking up too much unused code, sometimes it's unavoidable. And sometimes there is superfluous code in the provided object files:
There -gc-sections may help, which is yet experimental, but it exists.
Using inline and/or c++ may also yield WEAK symbols, which amiga-gcc does support. That stuff is also cleaned up by specifying -gc-sections.

Last edited by bebbo; 13 May 2022 at 10:12. Reason: typo
bebbo is offline  
Old 13 May 2022, 09:44   #1408
BSzili
Registered User

BSzili's Avatar
 
Join Date: Nov 2011
Location: Hungary
Posts: 828
Thanks, this makes perfect sense. In many cases the float-less printf is desirable, when the program uses no floating point math otherwise. I took a note of the -v switch.
BSzili is offline  
Old 06 June 2022, 22:13   #1409
mateusz_s
Registered User

 
Join Date: Jan 2020
Location: Poland
Posts: 136
@bebbo Hi, the online compiler at: https://franke.ms/cex/ no longer works.
Did you stop to supporting it?
mateusz_s is offline  
Old 08 June 2022, 18:29   #1410
mateusz_s
Registered User

 
Join Date: Jan 2020
Location: Poland
Posts: 136
Ok it works thanks
mateusz_s is offline  
Old 20 August 2022, 14:27   #1411
mousehouse
Registered User

 
Join Date: Sep 2019
Location: Netherlands
Posts: 98
Quote:
Originally Posted by bebbo View Post
Find here updated binaries for gcc on AmigaOS: https://franke.ms/download/gcc68.lha

All these programs are compiled with
-Os -noixemul -m68040 -ffast-math -fomit-frame-pointer -resident32
and can be made resident now, maybe this gains some speed, maybe not. On WinUAE there is no difference if the programs are resident, and resident does not count the invokations properly /shrug.

I omitted some files, which are duplicates, so copy:
Code:
c++ to g++,  m68k-amigaos-c++ and m68k-amigaos-g++
gcc to m68k-amigaos-gcc-6.5.0b
m68k-amigaos-ld to ld
Assign GCC: to the install folder and add GCC:bin to the path.
The headers and libs can be taken from the "normal" amiga-gcc stuff.
Use a sufficient stack size - I'm using 100k.
The first invokation of gcc fails on my system... since it can't invoke cc1. All further attempts succeed...
Really great! Any recommendations what would be the best 'base gcc' archive to use for the includes and libraries?

And if I add the ppc libraries for warpos would I be able to create ppc binaries as well?
mousehouse is offline  
Old 20 August 2022, 20:37   #1412
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 612
Quote:
Originally Posted by mousehouse View Post
Really great! Any recommendations what would be the best 'base gcc' archive to use for the includes and libraries?

Use the includes and libs from the amiga-gcc cross-toolchain.



Quote:
Originally Posted by mousehouse View Post
And if I add the ppc libraries for warpos would I be able to create ppc binaries as well?

no
bebbo is offline  
Old 25 August 2022, 11:29   #1413
alkis
Registered User

 
Join Date: Dec 2010
Location: Athens/Greece
Age: 51
Posts: 681
Is there a flag to make the toolchain use detach.o for startup?
alkis is offline  
Old 25 August 2022, 16:53   #1414
bebbo
botcher

 
Join Date: Jun 2016
Location: Hamburg/Germany
Posts: 612
Quote:
Originally Posted by alkis View Post
Is there a flag to make the toolchain use detach.o for startup?

sorry, there isn't a flag.


add the detach.o object to the linked objects and you're set.
Don't use it with resident stuff and select the proper version matching cpu/baserel(32).


Hope it works... I never tried this^^
bebbo is offline  
Old 11 September 2022, 11:05   #1415
ciVic
Registered User

 
Join Date: Oct 2013
Location: Germany
Posts: 38
dirent.h with ixemul

I'm trying to compile a recent rsync with GCC 6.5. It seems there is a problem with ixemul and dirent.h. During configure of rsync the test for dirent.h fails so in the end DIR is not defined.


I would expect that dirent.h is available when using ixemul (by not giving -noixemul and any -mcrt), as can be seen in the ixemul repo. However, in a simple test I get:


Code:
sh-3.2$ cat de.c
#include <dirent.h>
sh-3.2$ m68k-amigaos-gcc de.c -c
In file included from /opt/amiga/m68k-amigaos/sys-include/dirent.h:7:0,
                 from de.c:1:
/opt/amiga/m68k-amigaos/sys-include/sys/dirent.h:10:2: error: #error "<dirent.h> not supported"
 #error "<dirent.h> not supported"
  ^~~~~
This is obviously not the file from ixemul? It seems to be newlib:
Code:
sh-3.2$ grep -rnw "<dirent.h> not supported" amiga-gcc
amiga-gcc/projects/newlib-cygwin/newlib/libc/include/sys/dirent.h:10:#error "<dirent.h> not supported"
sh-3.2$

Last edited by ciVic; 11 September 2022 at 17:55.
ciVic is offline  
Old 14 September 2022, 12:38   #1416
mateusz_s
Registered User

 
Join Date: Jan 2020
Location: Poland
Posts: 136
Hi,
could you help me with adding assembler .s file to compilation?

I want to include this c2p asm routine into my project:
https://github.com/Kalmalyzer/kalms-...1x1_8_c5_040.s

I am using:
Code:
m68k-amigaos-gcc c2p1x1_8_c5_040.s, some_c_file.c -o frm060.exe
But got errors:
Code:
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s: Assembler messages:
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s: Warning: end of file not at end of a line; newline inserted
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:3: Error: junk at end of line, first unrecognized character is `2'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:4: Error: Unknown operator -- statement `mikael@kalms.org' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:7: Error: junk at end of line, first unrecognized character is `1'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:9: Error: Unknown operator -- statement `this routine is intended for use on all 68040 and 68060 based systems.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:10: Error: Unknown operator -- statement `it is not designed to perform well on 68020-030.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:12: Error: Unknown operator -- statement `this routine is released into the public domain. It may be freely used' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:13: Error: Unknown operator -- statement `for non-commercial as well as commercial purposes. A short notice via' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:14: Error: Unknown operator -- statement `email is always appreciated,though.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:17: Error: Unknown operator -- statement `estimated to run at copyspeed on 040-40 and 060' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:20: Error: Unknown operator -- statement `handles bitplanes of virtually any size(4GB)' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:23: Error: Unknown operator -- statement `chunky-buffer must be an even multiple of 32 pixels wide' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:24: Error: Unknown operator -- statement `if incorrect/invalid parameters are specified,the routine will' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:25: Error: Unknown operator -- statement `most probably crash.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:27: Error: Unknown operator -- statement `c2p1x1_8_c5_040_init sets chunkybuffer size/pos&bplsize' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:28: Error: Unknown operator -- statement `c2p1x1_8_c5_040 performs the actual c2p conversion' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:32: Error: Unknown operator -- statement `section code,code' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:35: Error: Unknown operator -- statement `d0.w chunkyx[chunky-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:36: Error: Unknown operator -- statement `d1.w chunkyy[chunky-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:37: Error: Unknown operator -- statement `d2.w (scroffsx)[screen-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:38: Error: Unknown operator -- statement `d3.w scroffsy[screen-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:39: Error: Unknown operator -- statement `d4.l (rowlen)[bytes]--offset between one row and the next in a bpl' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:40: Error: Unknown operator -- statement `d5.l bplsize[bytes]--offset between one row in one bpl and the next bpl' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:41: Error: Unknown operator -- statement `d6.l (chunkylen)[bytes]--offset between one row and the next in chunkybuf' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:45: Error: Unknown operator -- statement `_c2p1x1_8_c5_040_init' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:46: Error: Unknown operator -- statement `c2p1x1_8_c5_040_init' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:74: Error: Unknown operator -- statement `a0 c2pscreen' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:75: Error: Unknown operator -- statement `a1 bitplanes' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:79: Error: Unknown operator -- statement `_c2p1x1_8_c5_040' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:80: Error: Unknown operator -- statement `c2p1x1_8_c5_040' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:102: Error: syntax error -- statement `swap 16x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:113: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:131: Error: syntax error -- statement `swap 16x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:142: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:157: Error: syntax error -- statement `swap 4x1,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:172: Error: syntax error -- statement `swap 8x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:189: Error: Unknown operator -- statement `cnop 0,4' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:190: Error: unknown pseudo-op: `.x'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:204: Error: syntax error -- statement `swap 16x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:216: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:236: Error: syntax error -- statement `swap 16x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:248: Error: syntax error -- statement `swap 2x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:263: Error: syntax error -- statement `swap 4x1,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:280: Error: syntax error -- statement `swap 8x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:295: Error: unknown pseudo-op: `.start'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:297: Error: syntax error -- statement `swap 1x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:318: Error: syntax error -- statement `swap 4x1,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:336: Error: syntax error -- statement `swap 8x2,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:354: Error: syntax error -- statement `swap 1x2,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:389: Error: unknown pseudo-op: `.none'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:392: Error: Unknown operator -- statement `cnop 0,4' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:394: Error: Unknown operator -- statement `c2p1x1_8_c5_040_data' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:395: Error: Unknown operator -- statement `c2p1x1_8_c5_040_scroffs ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:396: Error: Unknown operator -- statement `c2p1x1_8_c5_040_pixels ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:397: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta0 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:398: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta1 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:399: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta2 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:400: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta3 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:401: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta4 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:402: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta5 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:403: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta6 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:404: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta7 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:405: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta8 ds.l 1' ignored
Thank You in advance
mateusz_s is offline  
Old 14 September 2022, 13:14   #1417
Marlon_
AmigaDev.com

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 33
Posts: 614
Quote:
Originally Posted by mateusz_s View Post
Hi,
could you help me with adding assembler .s file to compilation?

I want to include this c2p asm routine into my project:
https://github.com/Kalmalyzer/kalms-...1x1_8_c5_040.s

I am using:
Code:
m68k-amigaos-gcc c2p1x1_8_c5_040.s, some_c_file.c -o frm060.exe
But got errors:
Code:
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s: Assembler messages:
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s: Warning: end of file not at end of a line; newline inserted
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:3: Error: junk at end of line, first unrecognized character is `2'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:4: Error: Unknown operator -- statement `mikael@kalms.org' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:7: Error: junk at end of line, first unrecognized character is `1'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:9: Error: Unknown operator -- statement `this routine is intended for use on all 68040 and 68060 based systems.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:10: Error: Unknown operator -- statement `it is not designed to perform well on 68020-030.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:12: Error: Unknown operator -- statement `this routine is released into the public domain. It may be freely used' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:13: Error: Unknown operator -- statement `for non-commercial as well as commercial purposes. A short notice via' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:14: Error: Unknown operator -- statement `email is always appreciated,though.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:17: Error: Unknown operator -- statement `estimated to run at copyspeed on 040-40 and 060' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:20: Error: Unknown operator -- statement `handles bitplanes of virtually any size(4GB)' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:23: Error: Unknown operator -- statement `chunky-buffer must be an even multiple of 32 pixels wide' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:24: Error: Unknown operator -- statement `if incorrect/invalid parameters are specified,the routine will' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:25: Error: Unknown operator -- statement `most probably crash.' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:27: Error: Unknown operator -- statement `c2p1x1_8_c5_040_init sets chunkybuffer size/pos&bplsize' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:28: Error: Unknown operator -- statement `c2p1x1_8_c5_040 performs the actual c2p conversion' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:32: Error: Unknown operator -- statement `section code,code' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:35: Error: Unknown operator -- statement `d0.w chunkyx[chunky-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:36: Error: Unknown operator -- statement `d1.w chunkyy[chunky-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:37: Error: Unknown operator -- statement `d2.w (scroffsx)[screen-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:38: Error: Unknown operator -- statement `d3.w scroffsy[screen-pixels]' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:39: Error: Unknown operator -- statement `d4.l (rowlen)[bytes]--offset between one row and the next in a bpl' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:40: Error: Unknown operator -- statement `d5.l bplsize[bytes]--offset between one row in one bpl and the next bpl' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:41: Error: Unknown operator -- statement `d6.l (chunkylen)[bytes]--offset between one row and the next in chunkybuf' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:45: Error: Unknown operator -- statement `_c2p1x1_8_c5_040_init' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:46: Error: Unknown operator -- statement `c2p1x1_8_c5_040_init' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:74: Error: Unknown operator -- statement `a0 c2pscreen' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:75: Error: Unknown operator -- statement `a1 bitplanes' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:79: Error: Unknown operator -- statement `_c2p1x1_8_c5_040' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:80: Error: Unknown operator -- statement `c2p1x1_8_c5_040' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:102: Error: syntax error -- statement `swap 16x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:113: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:131: Error: syntax error -- statement `swap 16x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:142: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:157: Error: syntax error -- statement `swap 4x1,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:172: Error: syntax error -- statement `swap 8x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:189: Error: Unknown operator -- statement `cnop 0,4' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:190: Error: unknown pseudo-op: `.x'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:204: Error: syntax error -- statement `swap 16x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:216: Error: syntax error -- statement `swap 2x4,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:236: Error: syntax error -- statement `swap 16x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:248: Error: syntax error -- statement `swap 2x4,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:263: Error: syntax error -- statement `swap 4x1,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:280: Error: syntax error -- statement `swap 8x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:295: Error: unknown pseudo-op: `.start'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:297: Error: syntax error -- statement `swap 1x2,part 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:318: Error: syntax error -- statement `swap 4x1,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:336: Error: syntax error -- statement `swap 8x2,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:354: Error: syntax error -- statement `swap 1x2,part 2' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:389: Error: unknown pseudo-op: `.none'
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:392: Error: Unknown operator -- statement `cnop 0,4' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:394: Error: Unknown operator -- statement `c2p1x1_8_c5_040_data' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:395: Error: Unknown operator -- statement `c2p1x1_8_c5_040_scroffs ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:396: Error: Unknown operator -- statement `c2p1x1_8_c5_040_pixels ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:397: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta0 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:398: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta1 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:399: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta2 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:400: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta3 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:401: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta4 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:402: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta5 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:403: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta6 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:404: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta7 ds.l 1' ignored
/mnt/d/Dev/msRay_devpack_v0.34__8bit/EngineFrameworkAmiga/visualstudiocode-workspace/../src/c2p1x1_8_c5_040.s:405: Error: Unknown operator -- statement `c2p1x1_8_c5_040_delta8 ds.l 1' ignored
Thank You in advance
you need to compile that assembly file with VASM
Marlon_ is offline  
Old 14 September 2022, 14:10   #1418
mateusz_s
Registered User

 
Join Date: Jan 2020
Location: Poland
Posts: 136
Quote:
Originally Posted by Marlon_ View Post
you need to compile that assembly file with VASM
ok I used
Code:
 vasmm68k_mot file.s
and I got an output:
Code:
a.out
what about it?
mateusz_s is offline  
Old 14 September 2022, 14:12   #1419
Marlon_
AmigaDev.com

Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Sundsvall, Sweden
Age: 33
Posts: 614
Quote:
Originally Posted by mateusz_s View Post
ok I used
Code:
 vasmm68k_mot file.s
and I got an output:
Code:
a.out
what about it?
Code:
vasmm68k_mot  -no-opt -devpac -Fhunk -o c2p1x1_8_c5_040.o c2p1x1_8_c5_040.s
m68k-amigaos-gcc some_c_file.c -o some_c_file.o
m68k-amigaos-gcc c2p1x1_8_c5_040.o  some_c_file.o -o frm060.exe
Marlon_ is offline  
Old 14 September 2022, 14:30   #1420
mateusz_s
Registered User

 
Join Date: Jan 2020
Location: Poland
Posts: 136
Quote:
Originally Posted by Marlon_ View Post
Code:
vasmm68k_mot  -no-opt -devpac -Fhunk -o c2p1x1_8_c5_040.o c2p1x1_8_c5_040.s
m68k-amigaos-gcc some_c_file.c -o some_c_file.o
m68k-amigaos-gcc c2p1x1_8_c5_040.o  some_c_file.o -o frm060.exe
Great thanks!
Never used .s file before
mateusz_s is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New GCC based dev toolchain for AmigaOS 3.x cla Coders. Releases 8 24 December 2017 10:18
Issue with photon/xxxx WinUAE Toolchain arpz Coders. Asm / Hardware 2 26 September 2015 22:33
New 68k gcc toolchain arti Coders. C/C++ 17 31 July 2015 03:59
Hannibal's WinUAE Demo Toolchain 5 Bobic Amiga scene 1 23 July 2015 21:04
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 14:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Page generated in 0.13328 seconds with 16 queries