[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can a GS run Linux?
- Subject: Re: Can a GS run Linux?
- From: "Chris Morse" <win32mfc@gmail.com>
- Date: 9 Apr 2007 13:36:59 -0700
- Complaints-to: groups-abuse@google.com
- In-reply-to: <460d8ec9$0$24872$c30e37c6@pit-reader.telstra.net>
- Injection-info: y80g2000hsf.googlegroups.com; posting-host=66.57.234.253; posting-account=wZdC_Q0AAADdLlE0uj3Yey4sMaBF7Twf
- Newsgroups: comp.sys.apple2
- Organization: http://groups.google.com
- References: <eud4js$5qn$1@Kil-nws-1.UCIS.Dal.Ca> <460a18b7$0$6440$9b4e6d93@newsspool2.arcor-online.net> <460a2618$0$7423$5a62ac22@per-qv1-newsreader-01.iinet.net.au> <460a3e2d$0$24867$c30e37c6@pit-reader.telstra.net> <1175091790.732682.191620@y66g2000hsf.googlegroups.com> <460d8ec9$0$24872$c30e37c6@pit-reader.telstra.net>
- User-agent: G2/1.0
- Xref: g2news1.google.com comp.sys.apple2:24930
On Mar 30, 6:27 pm, Tristan Mumford <xtristan.xmumf...@xgmail.xcom>
wrote:
> TheWDCtoolchain would seem a better option apart from needing to write
> IIgs specific libraries. I say this because it's apparently an
> implementation of ANSI C.
> I downloaded their trial versions but haven't tried them yet.
Hiya.. I downloaded them, and checked out the 65816 C compiler.
BTW, after downloading all the files they showed, some came up bogus
-
that is, the file that was supposed to have the "Standard Libraries"
had a copy of the Assembler EXE in it. Strange, I'll have to check
again (and fill out that form!)
In the README.TXT file, I saw this:
LIMITATIONS
===========
The following limitations have been placed on the evaluation
edition:
Compiler:
1) Will not accept the -a compile to assembly list option.
2) Limited to 250 lines of C code (including header include
files).
3) The optimizer is not included, so -s is not available.
UMMMM... I made a SAMPLE.C program like this:
int main()
{
int i;
i = 1;
i = i + 32;
i = i % 11;
return(i);
}
and the -A option *DID* work, producing this SAMPLE.ASM file:
;:ts=8
R0 equ 1
R1 equ 5
R2 equ 9
R3 equ 13
code
xdef __main
func
__main:
longa on
longi on
tsc
sec
sbc #L2
tcs
phd
tcd
i_1 set 0
lda #$1
sta <L3+i_1
clc
lda #$20
adc <L3+i_1
sta <L3+i_1
lda <L3+i_1
ldx #<$b
xref __~mod
jsr __~mod
sta <L3+i_1
lda <L3+i_1
L4:
tay
pld
tsc
clc
adc #L2
tcs
tya
rts
L2 equ 2
L3 equ 1
ends
efunc
end
Notice that the "mod" function must be in the library..
I'll play around with it more tonight when I have time,
and see what happens when I hit that 250 line limit.
It's a darn shame that the compiler toolset costs $2750
and comes with a hardware dongle... good grief..
// CHRIS
Here's another SAMPLE.C:
/* Example 2 */
int main()
{
int s;
s = sum(100);
return(s);
}
int sum1(int c)
{
int s = 0;
int i = 0;
for(i = 1; i <= c; i++)
{
s += i;
}
return(s);
}
and here's the SAMPLE.ASM produced:
;:ts=8
R0 equ 1
R1 equ 5
R2 equ 9
R3 equ 13
code
xdef __main
func
__main:
longa on
longi on
tsc
sec
sbc #L2
tcs
phd
tcd
s_1 set 0
pea #<$64
jsr __sum
sta <L3+s_1
lda <L3+s_1
L4:
tay
pld
tsc
clc
adc #L2
tcs
tya
rts
L2 equ 2
L3 equ 1
ends
efunc
code
xdef __sum1
func
__sum1:
longa on
longi on
tsc
sec
sbc #L5
tcs
phd
tcd
c_0 set 3
s_1 set 0
i_1 set 2
stz <L6+s_1
lda #$1
sta <L6+i_1
brl L10002
L10001:
inc <L6+i_1
L10002:
sec
lda <L5+c_0
sbc <L6+i_1
bvs L7
eor #$8000
L7:
bmi L8
brl L10003
L8:
clc
lda <L6+s_1
adc <L6+i_1
sta <L6+s_1
brl L10001
L10003:
lda <L6+s_1
L9:
tay
lda <L5+1
sta <L5+1+2
pld
tsc
clc
adc #L5+2
tcs
tya
rts
L5 equ 4
L6 equ 1
ends
efunc
xref __sum
end