Comments (6)
Can you share a test case and command line used. Those two should both be coming from lib6803.a so either it didn't build right in your case or there is some pattern of linkage that is messing up and not including these two functions.
There's no provision for inline asm in the compiler - just linking with files built with the assembler.
from cc6303.
Yes, of course, with this little source code, the error appears with me:
#include <stdio.h>
void main() {
uint16_t value=255;
value = value/55;
}
The command line to compile is:
cc68 -tmc10 ./test.c -o test
I’m quite new to programming.
Can you quickly explain how to link an asm file?
from cc6303.
I have pushed a patch to fix this (it got broken due to a change for the other compiler that uses these assembler/linker tools).
For assembly an example might be simplest
foo.c:
extern int bar(void);
int foo(void) { return bar(); }
bar.s
.setcpu 6803
.export _bar
.code
_bar:
ldd #1234
addd _xyz
rts
.data
_xyz: .word 0
cc -tmc100 foo.c bar.s
C puts "_" in front of all user function and variable names. They also need to exported on the asm side to be visible in C.
You can also access arguments in asm functions. They are pushed on the stack before
the call so if you use TSX LDD offset,X you can access them.
The assembler code doesn't need to preserve D X or the flags
from cc6303.
If the Alice32 would benefit from different start addresses etc or startup and keyboard/console code let me know.
from cc6303.
Thank you for your help, it works well and I can also inject my asm code.
The codes for keyboards and the console works fine.
For the memory I found this information:
**** Memory Map d'alice 32/90 ****
=========================
- Variable libre Page 0 *
=========================
$20 - $7F (96 octets)
================== - Pointeur Basic *
==================
$80 - $FF (128 octet) (Potentiellement utilisable en C ou en ASM)
=================== - Variables Basic *
===================
$3000 - $3346 (838 octets) (Espace utilisabl en ASM)
(En Basic c'est l'espace reservé pour vos variables)
=========================== - Programme Code Alice 32 *
===========================
$3346 - $4FFF (7353 octets)
=========================== - Programme Code Alice 90 *
===========================
$3346 - $AFFF (31930 octets)
=========================== - Extension 16ko Alice 32 *
===========================
$5000 - $8FFF (16383 octets)
from cc6303.
Thanks for the info
from cc6303.
Related Issues (16)
- [info] How to use? Can it be used for the TRS-80 MC-10? HOT 33
- [info/bug?] How do I build the compiler? make all fails under Windows/Cygwin HOT 2
- [bug] Probably wrong arithmetic or cast HOT 4
- [bug] Arrays seem to return their index HOT 1
- [bug] Broken Conditional or assignment HOT 2
- [bug?] make clean does not clean libs and other files. Is it wanted? HOT 2
- [question] Assembly and C? HOT 7
- 6800 build generates a relocation failure when building Fuzix "dc"
- libc.a is 0 byte HOT 12
- [bug?][right shift] Right shift operator produces broken binary HOT 4
- [feature request] Future support for the TMS9900? (if possible with minimal lib for the TI99/4A?) HOT 11
- [question/feature] Where is the MC10 code located by default? HOT 8
- Issue with little CRC-16 program compilation? HOT 9
- Syntax errors with conditional jumps HOT 1
- Cassette file produced by Tapify gets me ?FM Errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cc6303.