Commit 2426d166 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Removed C compiler output files.

  Removed assembler.
Detail:
  Removed unnecessary assembler - which was just cc -S output for the C
    files!
  Imports the muldiv and riscosa (osvarlen) functions from AsmUtils.
Admin:
  Requires AsmUtils 0.03 or later.
  RAM build tested.

Version 1.50. Tagged as 'DrawFile-1_50'
parent d961ff56
s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
c/** gitlab-language=c linguist-language=c linguist-detectable=true
h/** gitlab-language=c linguist-language=c linguist-detectable=true
......
......@@ -50,6 +50,7 @@ WFLAGS = ~c~v
OSLIB = OSLib:OSLib.o
RSTUBS = RISC_OSLib:o.romcstubs
ABSSYM = RISC_OSLib:o.abssym
ASMUTILS = C:AsmUtils.o.AsmUtilsZM
#
# Program specific options:
......@@ -59,7 +60,7 @@ TARGET = aof.DrawFile
OBJS = o.bbox o.callback o.declare o.header o.main \
o.muldiv o.render o.riscos o.riscosa o.textarea o.trfm o.verify
o.render o.riscos o.textarea o.trfm o.verify
OBJS_310 = \
o.bbox o.callback o.declare o.files o.header310 oSA.main \
o.muldiv o.render o.riscos o.textarea o.trfm o.verify
......@@ -68,8 +69,6 @@ OBJSD = debug.bbox debug.callback debug.declare o.files o.header \
o.hostfs debug.main o.muldiv debug.render \
debug.riscos debug.textarea debug.trfm debug.verify debug.trace debug.m
ASMS = s.bbox s.declare s.main s.render s.textarea s.verify
INCS = i.bbox i.declare i.main i.render i.files i.textarea i.verify
RESOURCES = o.Messages
......@@ -114,8 +113,8 @@ resources-: resources_common
#
# ROM target (re-linked at ROM Image build time)
#
${TARGET}: ${OBJS} ${OSLIB} ${RSTUBS}
${LINK} -o $@ -aof ${OBJS} ${OSLIB} ${RSTUBS}
${TARGET}: ${OBJS} ${OSLIB} ${RSTUBS} ${ASMUTILS}
${LINK} -o $@ -aof ${OBJS} ${OSLIB} ${RSTUBS} ${ASMUTILS}
#
# Final link for the ROM Image (using given base address)
......@@ -149,7 +148,7 @@ objs: ${OBJS} ${OBJSD}
@Echo Made objs
map: ${OBJS} ${OSLIB} CLib:o.Stubs
${LINK} -map -output null: -s Symbols ${OBJS} ${OSLIB} CLib:o.Stubs > Map
${LINK} -map -output null: -s Symbols ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS} > Map
release: RM.DrawFile
%Copy RM.DrawFile Choices:Boot.PreDesk.DrawFile ~CFLNRV
......@@ -157,15 +156,15 @@ release: RM.DrawFile
@Echo Made release
# Internal targets
RM.DrawFile: ${OBJS} ${OSLIB} CLib:o.Stubs
${LINK} -module -o $@ ${OBJS} ${OSLIB} CLib:o.Stubs
RM.DrawFile: ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJS} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
RM.DrawFileD: ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs
${LINK} -module -o $@ ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs
RM.DrawFileD: ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJSD} ${RESOURCES} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
# For Aquarius
RM.310.DrawFile: ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs
${LINK} -module -o $@ ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs
RM.310.DrawFile: ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
${LINK} -module -o $@ ${OBJS_310} ${RESOURCES310} ${OSLIB} CLib:o.Stubs ${ASMUTILS}
# Static dependencies:
......
/* (1.49)
/* (1.50)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.49
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Oct 1998
#define Module_MajorVersion_CMHG 1.50
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Nov 1999
#define Module_MajorVersion "1.49"
#define Module_Version 149
#define Module_MinorVersion ""
#define Module_Date "29 Oct 1998"
#define Module_MajorVersion "1.50"
#define Module_Version 150
#define Module_MinorVersion ""
#define Module_Date "30 Nov 1999"
#define Module_FullVersion "1.50"
a1 RN 0
a2 RN 1
a3 RN 2
a4 RN 3
v1 RN 4
v2 RN 5
ip RN 12
sp RN 13
lr RN 14
pc RN 15
AREA |C$$code|, CODE, READONLY
EXPORT muldiv
;;;; IMPORT raise
muldiv
; muldiv(a, b, c)
; result = a*b/c
; the intermediate product is 64 bits long
; do everything using moduluses, and sort out signs later
STMFD sp!, {a1, a2, a3, a4, v1, v2, lr}
; first, the double-length product, returned in a3 & a4
; uses ip, a1 and a2 as workspace
MOV a3, #0
MOV a4, #0
MOV ip, #0
CMPS a2, #0
RSBLT a2, a2, #0 ; abs b
MOV v2, a2
CMPS a1, #0
RSBLT a1, a1, #0 ; abs a
muldiv0
MOVS a2, a2, LSR #1
BCC muldiv1
ADDS a4, a4, a1
ADC a3, a3, ip
muldiv1
MOVS a1, a1, ASL #1
ADC ip, ip, ip
CMPS a2, #0
BNE muldiv0
; now the 64*32 bit divide
; dividend in a3 and a4
; remainder ends up in a4; quotient in ip
; uses a1 and a2 to hold the (shifted) divisor;
; v1 for the current bit in the quotient
LDR a2, [sp, #8] ; recover divisor
CMPS a2, #0
LDMEQFD sp!, {a1-a4, v1, v2, pc}^
;;was BEQ muldiv_by_0, but we might be a module
RSBLT a2, a2, #0 ; abs c
MOV v2, a2
MOV ip, #0
MOV a1, #0
MOV v1, #0
MOV lr, #1
muldiv2
CMPS a1, #&80000000
BCS muldiv3
CMPS a1, a3
CMPEQS a2, a4 ; compare of [a1, a2] against [a3, a4]
BCS muldiv3
MOVS a2, a2, ASL #1
MOV a1, a1, ASL #1
ADC a1, a1, #0
ADD v1, v1, #1
B muldiv2
muldiv3
CMPS a1, a3
CMPEQS a2, a4
BHI muldiv4
CMPS v1, #31
ADDLE ip, ip, lr, ASL v1
SUBS a4, a4, a2
SBC a3, a3, a1
muldiv4
MOVS a1, a1, ASR #1
MOV a2, a2, RRX
SUBS v1, v1, #1
BGE muldiv3
; now all we need to do is sort out the signs.
LDMFD sp!, {a1, a2, a3, v1}
EOR a2, a2, a1 ; a2 has the sign of a*b: a3 is the sign of c
MOV a1, ip
TEQS a2, a3 ; if a*b and c have opposite signs,
RSBMI a1, a1, #0 ; negate the quotient
CMPS a2, #0 ; and if the dividend was negative,
RSBLT a4, a4, #0 ; negate the remainder
;;;; Now discard the remainder - J R C 19 March 1991
;;;; STR a4, [v1]
LDMFD sp!, {v1, v2, pc}^
muldiv_by_0 ;not used
;;;; LDMFD sp!, {a1-a4, v1, v2, lr}
;;;; MOV a1, #2 ; SIGFPE
;;;; B raise
END
;riscosa.asm - length of a variable
;written by Jonathan Coxhead, 15th Aug 1995
GET OS:Hdr.OS
EXPORT riscos_var_len
AREA |C$$code|, CODE, READONLY
riscos_var_len ROUT
;Entry R0 -> name of a variable
; R1 = variable type (os_VARTYPE_EXPANDED or 0)
;Exit R0 = length of variable value, or -1 if not found
STMFD SP!, {R4, LR}
MOV R4, R1
MOV R3, #0
MOV R2, #1 << 31
MOV R1, #Null
SWI XOS_ReadVarVal
;Ignore error
MVN R0, R2
LDMFD SP!, {R4, PC}^
END
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; generated by Norcroft RISC OS ARM C vsn 4.10 [Jan 13 1993]
a1 RN 0
a2 RN 1
a3 RN 2
a4 RN 3
v1 RN 4
v2 RN 5
v3 RN 6
v4 RN 7
v5 RN 8
v6 RN 9
sl RN 10
fp RN 11
ip RN 12
sp RN 13
lr RN 14
pc RN 15
f0 FN 0
f1 FN 1
f2 FN 2
f3 FN 3
f4 FN 4
f5 FN 5
f6 FN 6
f7 FN 7
AREA |C$$code|, CODE, READONLY
IMPORT |__main|
|x$codeseg|
B |__main|
IMPORT |x$stack_overflow|
IMPORT trfm_box
EXPORT bbox
bbox
MOV ip, sp
STMFD sp!, {v1,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
MOV a3, a2
MOV a2, a4
LDR a1, [fp, #4]
MOV v1, #0
ADD a3, a3, #24
BL trfm_box
MOV a1, v1
LDMEA fp, {v1,fp,sp,pc}^
AREA |C$$data|
|x$dataseg|
END
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; generated by Norcroft RISC OS ARM C vsn 4.10 [Jan 13 1993]
a1 RN 0
a2 RN 1
a3 RN 2
a4 RN 3
v1 RN 4
v2 RN 5
v3 RN 6
v4 RN 7
v5 RN 8
v6 RN 9
sl RN 10
fp RN 11
ip RN 12
sp RN 13
lr RN 14
pc RN 15
f0 FN 0
f1 FN 1
f2 FN 2
f3 FN 3
f4 FN 4
f5 FN 5
f6 FN 6
f7 FN 7
AREA |C$$code|, CODE, READONLY
IMPORT |__main|
|x$codeseg|
B |__main|
IMPORT |x$stack_overflow|
IMPORT callback
EXPORT declare
declare
MOV ip, sp
STMFD sp!, {v1,v2,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
SUB sp, sp, #24
STR a1, [sp, #8]
STR a2, [sp, #4]
MOV a1, #0
STR a1, [sp, #12]
STR a1, [sp, #16]
ADD v1, a2, a3
ADD a1, a2, #40
STR a1, [sp, #20]
LDR v2, [pc, #L00004c-.-8]
LDR ip, [sl, #0]
ADD v2, ip, v2
B |L000080.J5.declare|
L00004c
IMPORT main_declaration_callback
DCD main_declaration_callback
|L000050.J4.declare|
STR a1, [sp, #0]
LDR a4, [a1, #0]
MOV a2, sp
LDR a1, [v2, #0]
MOV a3, #1
BL callback
ADD a1, sp, #20
LDR a2, [sp, #20]
LDR a2, [a2, #4]
LDR a3, [a1, #0]
ADD a2, a2, a3
STR a2, [a1, #0]
|L000080.J5.declare|
LDR a1, [sp, #20]
CMPS a1, v1
BLT |L000050.J4.declare|
LDR a1, [sp, #16]
LDMEA fp, {v1,v2,fp,sp,pc}^
IMPORT xpdriver_declare_font
IMPORT strlen
EXPORT declare_font_table
declare_font_table
MOV ip, sp
STMFD sp!, {v1,v2,v3,v4,v5,v6,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
SUB sp, sp, #4
MOV v4, #0
MOV v2, v4
MOV v1, a2
LDR a1, [v1, #0]
STR a1, [v1, #12]
LDR a2, [a1, #4]
ADD v6, a1, a2
LDR a1, [v1, #8]
ANDS a1, a1, #1
MOVEQ a1, v4
MOVNE a1, #1
ORR v5, a1, #2
LDR a1, [v1, #12]
ADD a1, a1, #8
STR a1, [sp, #0]
B |L000124.J8.declare_font_table|
|L0000ec.J7.declare_font_table|
ADD a2, a1, #1
MOV a3, v5
MOV a1, #0
BL xpdriver_declare_font
MOVS v2, a1
BNE |L00013c.J11.declare_font_table|
MOV v3, sp
LDR a1, [sp, #0]
ADD a1, a1, #1
BL strlen
ADD a2, a1, #2
LDR a1, [v3, #0]
ADD a1, a2, a1
STR a1, [v3, #0]
|L000124.J8.declare_font_table|
LDR a1, [sp, #0]
CMPS a1, v6
BGE |L00013c.J11.declare_font_table|
LDRB a2, [a1, #0]
CMPS a2, #0
BNE |L0000ec.J7.declare_font_table|
|L00013c.J11.declare_font_table|
LDR a1, [v1, #16]
CMPS a1, #0
STREQ v2, [v1, #16]
CMPS v2, #0
MOVNE a1, v4
MOVEQ a1, #1
LDMEA fp, {v1,v2,v3,v4,v5,v6,fp,sp,pc}^
EXPORT declare_group
declare_group
MOV ip, sp
STMFD sp!, {v1,v2,v3,v4,v5,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
MOV v4, #0
MOV v2, v4
MOV v1, a2
LDR a1, [v1, #0]
LDR a2, [a1, #4]
ADD v3, a1, a2
ADD a1, a1, #36
STR a1, [sp, #-4]!
LDR v5, [pc, #L00004c-.-8]
LDR ip, [sl, #0]
ADD v5, ip, v5
B |L0001d0.J5.declare_group|
|L00019c.J4.declare_group|
STR a1, [v1, #0]
LDR a1, [sp, #0]
LDR a4, [a1, #0]
MOV a2, v1
LDR a1, [v5, #0]
MOV a3, #1
BL callback
MOV a1, sp
LDR a2, [sp, #0]
LDR a2, [a2, #4]
LDR a3, [a1, #0]
ADD a2, a2, a3
STR a2, [a1, #0]
|L0001d0.J5.declare_group|
LDR a1, [sp, #0]
CMPS a1, v3
BLT |L00019c.J4.declare_group|
LDR a1, [v1, #16]
CMPS a1, #0
STREQ v2, [v1, #16]
CMPS v2, #0
MOVNE a1, v4
MOVEQ a1, #1
LDMEA fp, {v1,v2,v3,v4,v5,fp,sp,pc}^
EXPORT declare_tagged
declare_tagged
MOV ip, sp
STMFD sp!, {v1,v2,v3,v4,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
MOV v4, #0
MOV v3, v4
MOV v2, a2
LDR a1, [v2, #0]
ADD a1, a1, #28
STR a1, [v2, #0]
LDR a4, [a1, #0]
MOV a2, v2
LDR a1, [pc, #L00004c-.-8]
LDR ip, [sl, #0]
ADD a1, ip, a1
LDR a1, [a1, #0]
MOV v1, #1
MOV a3, v1
BL callback
LDR a1, [v2, #16]
CMPS a1, #0
STREQ v3, [v2, #16]
CMPS v3, #0
MOVNE a1, v4
MOVEQ a1, v1
LDMEA fp, {v1,v2,v3,v4,fp,sp,pc}^
IMPORT textarea_declare
EXPORT declare_text_area
declare_text_area
MOV ip, sp
STMFD sp!, {v1,v2,v3,fp,ip,lr,pc}
SUB fp, ip, #4
CMPS sp, sl
BLLT |x$stack_overflow|
MOV v3, #0
MOV v1, a2
LDR a1, [v1, #8]
ANDS a1, a1, #1
MOV v2, #1
MOVEQ a1, v3
MOVNE a1, v2
ORR a2, a1, #2
LDR a1, [v1, #0]
BL textarea_declare
LDR a2, [v1, #16]
CMPS a2, #0
STREQ a1, [v1, #16]
CMPS a1, #0
MOVNE a1, v3
MOVEQ a1, v2
LDMEA fp, {v1,v2,v3,fp,sp,pc}^
AREA |C$$data|
|x$dataseg|
END
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
;files.s - export funny symbols referring to resource files
GET OS:Hdr.Types
AREA |C$$code|, CODE, READONLY
MACRO
$fn ResourceFile $symbol
LCLS label
label SETS :CHR: &7C :CC: "$symbol" :CC: :CHR: &7C
EXPORT $fn
$fn LDR A1, [PC, #%FT01 - {PC} - 8]
MOVS PC, LR
IMPORT $label
01
DCD $label
MEND
files_messages ResourceFile Messages
END
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment