Commit 26369fa5 authored by Ben Avison's avatar Ben Avison
Browse files

Adapted assembly process so that the choice of Options file (previously based...

Adapted assembly process so that the choice of Options file (previously based purely on the "System" variable) can be overridden by passing "OPTIONS=foo" as an argument to either MkRom, or to amu/amu_machine directly, or indirectly, by specifying it in the components file for a build. To accomplish this, it was necessary to switch from using aasm to objasm - hence the large number of source files affected in this commit.

Version 4.09. Tagged as 'Wimp-4_09'
parent e55b4b2a
......@@ -24,6 +24,8 @@
# Now correctly copies Tools3D to Resources:...Tools
# 26-Jun-95 JRH Now copies STB (ie hacked-down) versions of Tools,
# Templates and Sprites. Doesn't copy Sprites22
# 23-Oct-98 BJGA Changed to use objasm, so that we can override the
# choice of options file using an argument to amu
#
#
......@@ -35,19 +37,24 @@ EXP_HDR = <export$dir>
# Generic options:
#
MKDIR = cdir
AS = aasm
AS = objasm
LD = link
CP = copy
RM = remove
CCFLAGS = -c -depend !Depend -IC:
ASFLAGS = -depend !Depend -Stamp -quit -module -To $@ -From
WIPE = -wipe
ASFLAGS = -ABSolute -NOWarn -depend !Depend ${THROWBACK} ${OPTS} -o $@
LDFLAGS = -bin -o $@
CPFLAGS = ~cfr~v
WFLAGS = ~cfr~v
#
# Program specific options:
#
COMPONENT = Wimp
SOURCE = s.Wimp
OBJECT = o.Wimp
TARGET = rm.Wimp
OPTS = -PreDefine "Options SETS \"${OPTIONS}\""
EXPORTS = ${EXP_HDR}.Wimp \
${EXP_HDR}.WimpSpace
......@@ -66,6 +73,7 @@ install_rom: ${TARGET}
clean:
${RM} ${TARGET}
${WIPE} o ${WFLAGS}
@echo ${COMPONENT}: cleaned
resources: resources-${CMDHELP}
......@@ -87,9 +95,14 @@ resources-None: resources_common
resources-: resources_common
print LocalRes:<UserIF>.CmdHelp { >> ${RESDIR}.${COMPONENT}.Messages }
${TARGET}: ${SOURCE}
${OBJECT}: ${SOURCE}
${MKDIR} o
${AS} ${ASFLAGS} ${SOURCE}
Access ${TARGET} rw/rw
${TARGET}: ${OBJECT}
${LD} ${LDFLAGS} ${OBJECT}
SetType $@ Module
Access $@ rw/r
${EXP_HDR}.Wimp: hdr.Wimp
${CP} hdr.Wimp $@ ${CPFLAGS}
......
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom
amu_machine rom %*0
......@@ -69,7 +69,6 @@
Option TrueIcon1, true ; true colour support, phase 1
Option SwitchingToSprite, true ; update vdu variables when switching to sprite
Option StartTaskPostFilter, true ; always call the post filter on exit from Wimp_StartTask
Option UTF8, true ; support for UTF-8 alphabet (Unicode)
END
......@@ -76,6 +76,7 @@
Option DoubleHeightVDU4, false ; Wimp_SetMode selects modes with double height VDU 4 output
Option ForceTwitter, false :LAND: Twitter ; Twitter needs-help windows & ignore interlace ModeFlags bit
Option HideIconBar, false ; icon bar is behind Wimp back window until brought to front
Option UTF8, true ; support for UTF-8 alphabet (Unicode)
Option RegisterMessages, false
Option RegisterTools2D, false
......
......@@ -5,8 +5,8 @@
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
Module_MajorVersion SETS "4.08"
Module_Version SETA 408
Module_MajorVersion SETS "4.09"
Module_Version SETA 409
Module_MinorVersion SETS ""
Module_Date SETS "22 Oct 1998"
Module_Date SETS "23 Oct 1998"
END
/* (4.08)
/* (4.09)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.08
#define Module_MajorVersion_CMHG 4.09
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Oct 1998
#define Module_Date_CMHG 23 Oct 1998
#define Module_MajorVersion "4.08"
#define Module_Version 408
#define Module_MajorVersion "4.09"
#define Module_Version 409
#define Module_MinorVersion ""
#define Module_Date "22 Oct 1998"
#define Module_Date "23 Oct 1998"
......@@ -149,7 +149,7 @@ return_autoscroll_state
;;-----------------------------------------------------------------------------
int_autoscroll
ENTRY "R0-x1"
Entry "R0-x1"
MOV R0, #0
BL update_autoscroll_state ; deactivate any existing autoscroll
; (does nothing if already off)
......@@ -196,7 +196,7 @@ int_autoscroll
update_autoscroll_state
; In: R0 = new autoscroll state, in bits 0-4
; Sends a message to the autoscroll owner if the state (of any bit) has changed
ENTRY "R0-R2"
Entry "R0-R2"
LDR R1, autoscr_state
STR R0, autoscr_state
BL update_autoscroll_flags
......@@ -223,7 +223,7 @@ update_autoscroll_state
update_autoscroll_flags
; Updates status flag bits to reflect current state
ENTRY "R0-y1,handle,userblk"
Entry "R0-y1,handle,userblk"
ADRL R14, autoscr_state
LDMIA R14, {R0, R1, cx0, cy0, cx1, cy1}
......@@ -320,7 +320,7 @@ update_autoscroll_flags
get_centre_zone
; In: handle = autoscroll window handle
; Out: x0-y0 = centre zone (may be zero width or height)
ENTRY "cx0-cy1"
Entry "cx0-cy1"
ADRL R14, autoscr_pz_x0 ; load zone sizes
LDMIA R14, {cx0, cy0, cx1, cy1}
......@@ -366,7 +366,7 @@ autoscroll_pointer_routine_1
; handles pointer changes according to the default rules
; In: R0 = new autoscroll state
; R1 = old autoscroll state
ENTRY "R0-R7"
Entry "R0-R7"
TST R0, #af_scrolling ; don't show pointer if not scrolling
MOVEQ R0, #0
TST R1, #af_scrolling
......@@ -505,7 +505,7 @@ autoscroll_pointers
poll_autoscroll
; Called during poll - update scroll flags, issue open/scroll rqs if necessary
ENTRY "R0-cy1"
Entry "R0-cy1"
LDR R0, autoscr_state
BL update_autoscroll_state
......
......@@ -310,7 +310,7 @@ wimptempfname DCB "WindowManager:Templates",0
; Out handle -> window data of iconbar (ie. absolute handle)
ASSERT handle = R10 ; we want to return this
openiconbar ENTRY "R1-R9,R11"
openiconbar Entry "R1-R9,R11"
LDR R0,iconbarhandle
SUBS handle,R0,#0
......
......@@ -23,7 +23,7 @@ debug_memory
DCB "WIMP memory debugging",0
ALIGN
XROS_Module ENTRY
XROS_Module Entry
TEQ R0,#6
TEQNE R0,#7
TEQNE R0,#13
......@@ -264,7 +264,7 @@ ExtendList
|
XROS_Module ENTRY
XROS_Module Entry
TEQ R0,#6
TEQNE R0,#7
TEQNE R0,#13
......
......@@ -19,7 +19,7 @@
[ DebugMemory
XROS_Module ENTRY
XROS_Module Entry
TEQ R0,#6
TEQNE R0,#7
TEQNE R0,#13
......@@ -192,7 +192,7 @@ noclaim
|
XROS_Module ENTRY
XROS_Module Entry
TEQ R0,#6
TEQNE R0,#7
TEQNE R0,#13
......
......@@ -225,7 +225,7 @@ err2
;; Routine to stash tile_1 from wimp area
;; returns R2-> tile_1 or VS
findwimptilesprite ENTRY "R0-R1"
findwimptilesprite Entry "R0-R1"
; is tiling disabled by CMOS ?
MOV R0,#161
MOV R1,#&8c
......@@ -368,7 +368,7 @@ tile_putsprite
Pull "R1-R7,PC",,^
get_new_pixtable ENTRY "R0-R6"
get_new_pixtable Entry "R0-R6"
BIC R7,R7,#&80000000 ; now an address again
......
......@@ -20,7 +20,7 @@ watchdogguard DCD &E240569E
[ WatchdogTimer
BreakWatchdogHandler ENTRY "R0"
BreakWatchdogHandler Entry "R0"
|
......@@ -277,7 +277,7 @@ watchdogappname
DCB "Window Manager",0
ALIGN
printjobrunning ENTRY R0
printjobrunning Entry R0
LDR R14,taskhandle
TEQ R0,R14 ; killing current task ?
EXITS NE
......
......@@ -62,15 +62,20 @@ Module_BaseAddr
GET hdr.WIMPMacros
GET hdr.IconHigh
LEADR Module_LoadAddr
GBLL true
GBLL false
true SETL {TRUE}
false SETL {FALSE}
GBLS LoadWimpOptions
[ Options = ""
LoadWimpOptions SETS "GET Options.s.<System>"
|
LoadWimpOptions SETS "GET Options.s.$Options"
]
GET Options.s.!Default
GET Options.s.<System>
$LoadWimpOptions
GET Hdr:ImageSize.<ImageSize>
GET Options.s.!Common
GET Options.s.!Debug
......
This diff is collapsed.
......@@ -599,7 +599,7 @@ rationalisememory
; Ticker routine called every second if its a portable, install a callback
; handler and then exit.
CallEveryHandler ENTRY "R0"
CallEveryHandler Entry "R0"
MOV R0,PC
TEQP PC,#SVC_mode ; back to SVC mode IRQs on
......@@ -623,7 +623,7 @@ CallEveryHandler ENTRY "R0"
[ mousecache
MouseCallEveryHandler ENTRY ""
MouseCallEveryHandler Entry ""
MOV R0,#-1 ; flag as needing to re-read mouse posn
STRB R0,recacheposn
......@@ -636,7 +636,7 @@ MouseCallEveryHandler ENTRY ""
; CallBack routine used to update the idle speeds ready for speed control.
; 321nk updated to use PowerUtils 'more inteligent' algorithms.
callback ENTRY "R0-R3"
callback Entry "R0-R3"
LDR r3, IdlePerSec
MOV r1, #0 ; read and then reset, even if not active
......@@ -896,7 +896,7 @@ returntaskhandle
ADD R1,sp,#ms_yourref ; R5 set up earlier!
STMIA R1!,{R2-R5}
LDRB R14,[R0]
TEQ R14,#"\"
TEQ R14,#"\\"
ADDEQ R0,R0,#1
BL copy0 ; copy from [R0] to [R1]
;
......@@ -1033,7 +1033,7 @@ $lab ConfigOption $string, $unit, $cmosbyte, $cmosbit, $cmossize, $shift, $eo
; $intbyte: B => store as byte value
; $lut: (optional) label for table of <8 char strings to use for each value
; $num: non-null means table contains 32-bit words instead
ENTRY "R7-R11"
Entry "R7-R11"
LDR wsptr, [R12]
CMP R0, #1
BHI %FT02
......@@ -1267,7 +1267,7 @@ status_scaninttable
; In: R0 -> increasing integer table (terminated by -1)
; R2 = number to match
; Out: R2 = index into table of best match
ENTRY
Entry
MOV R4, R2
MOV R1, #0
01 LDR R3, [R0, R1, LSL #2]
......@@ -1282,7 +1282,7 @@ status_scanstringtable
; In: R0 -> string to match case-insensitively (not null terminated)
; R4 -> array of null-terminated strings, starting at 2-word boundaries (terminates with a null string)
; Out: R2 = index into array of match, or V set if no match
ENTRY
Entry
MOV R3, sp
SUB sp, sp, #12 ; must be at least 2 longer than longest string
MOV R2, sp
......@@ -1424,6 +1424,8 @@ statusmess_scrolldelay DCB "WimpAutoScrollDelay ",0
configmess_scrolldelay DCB "WimpAutoScrollDelay <D>",cr,lf,0
]
ALIGN
|
WimpDragDelayC_Code
......@@ -3487,7 +3489,7 @@ int_force_redraw_whole_border
; R0,R1,x0,y0,x1,y1 corrupted
; Note that this routine must NOT be called within int_flush_opens, after we've copied invalidrects to oldinvalidrects
int_force_redraw_border ENTRY
int_force_redraw_border Entry
LDR R1,[handle,#w_old_flags]
ASSERT wf_icon1 = 1 :SHL: 24
......@@ -5757,7 +5759,7 @@ int_flush_opens ROUT
; userblk = offset to old/new data (ie. w_old_data or w_new_data)
; Out old h/v scrollbar(s) of parent invalidated if child has/had wf_inborder set and overlaps/ped parent's scrollbars
check_scrollbar_overlap ENTRY "handle"
check_scrollbar_overlap Entry "handle"
ADD R0,handle,userblk ; R0 -> child window's data (old or new)
......@@ -6043,7 +6045,7 @@ remove_children ROUT
; EQ => border will be block-copied with the work area
; NE => border will be dealt with separately
isborderlinked ENTRY "R0,R1,cx0,cy0,cx1,cy1,x0,y0,x1,y1"
isborderlinked Entry "R0,R1,cx0,cy0,cx1,cy1,x0,y0,x1,y1"
BL hasfocus_changing
LDREQ R14,[handle,#w_flags]
......@@ -6532,7 +6534,7 @@ int_flush_open ROUT
; In handle -> window to consider
; Out NE => borders need redrawing due to ws_hasfocus bit changing
hasfocus_changing ENTRY "R1,R2"
hasfocus_changing Entry "R1,R2"
LDR R14,[handle,#w_old_flags]
LDR R1,[handle,#w_flags]
......@@ -6549,7 +6551,7 @@ hasfocus_changing ENTRY "R1,R2"
; In handle -> window to consider
; Out NE => borders need redrawing due to iconise button dis/appearing due to window stack change
iconise_changing ENTRY "R0-R2"
iconise_changing Entry "R0-R2"
LDR R14, [handle, #w_old_flags]
LDR R1, [handle, #w_flags]
......@@ -7440,7 +7442,7 @@ endclose
[ ChildWindows
int_mark_window_opening ENTRY "R0,R1"
int_mark_window_opening Entry "R0,R1"
MOV R14,#1
STRB R14,openspending
......@@ -7460,7 +7462,7 @@ int_mark_window_opening ENTRY "R0,R1"
; Out: window and all descendants added to openingwinds list
; R0,R1 corrupted
int_mark_children ENTRY "handle"
int_mark_children Entry "handle"
ADRL R1,openingwinds+lh_forwards-ll_forwards ; stick this window in the opening list first
LDR R0,[R1,#ll_forwards]
......@@ -8317,7 +8319,7 @@ blankicon DCD &0D
;
; Ensures window tool tinting is on, if appropriate for this window
;
forcetint_on ENTRY "R0,R2"
forcetint_on Entry "R0,R2"
LDR R2, tool_list
LDR R2, [R2]
TEQ R2, #0 ; don't bother if there aren't any tools
......@@ -8334,7 +8336,7 @@ forcetint_on ENTRY "R0,R2"
;
; Ensures window tool tinting is off
;
forcetint_off ENTRY "R2"
forcetint_off Entry "R2"
LDR R2, tool_list
LDR R2, [R2]
TEQ R2, #0 ; don't bother if there aren't any tools
......@@ -9316,7 +9318,7 @@ checktwitter
; In: handle = window handle
; Out: NE => twitter, EQ => don't twitter
;
ENTRY
Entry
[ ForceTwitter
TEQ PC, #0 ; set NE every time!!
|
......@@ -9334,7 +9336,7 @@ checktwitter
]
EXIT
antitwitter ENTRY "r0-r3"
antitwitter Entry "r0-r3"
ADR r0, clipx0
LDMIA r0,{r0-r3}
SUB r1,r1,#2
......
......@@ -226,7 +226,7 @@ posticonfilter_default
;; once done issue a svc_RegisterFilters.
;;-----------------------------------------------------------------------------
defaultfilters ENTRY "R0-R2"
defaultfilters Entry "R0-R2"
ADR R0,filtertable ; -> list of default owners
ADRL R1,prefilter ; -> list of vectors to install
......@@ -2380,7 +2380,7 @@ prepare_external_key_event
; keyout_buffer filled with any remaining external keycodes
; hotkeyptr set up (unless we're not multitasking)
; LE => we are multitasking
ENTRY "R0,R4,R5"
Entry "R0,R4,R5"
TST R6, #1:SHL:31 ; was it a function key?
ANDNE R6, R6, #&FF
ORRNE R6, R6, #&100 ; convert into external form if so
......@@ -2418,7 +2418,7 @@ get_internal_keycode_from_buffer
; Exit: R6 = internal keycode : -1 means no character
; &800000xx represents a function key
; else character code ( <= &7FFFFFFF if UTF-8 alphabet, <= &FF otherwise )
ENTRY "R0-R4"
Entry "R0-R4"
LDRB R3, [R7] ; get buffer length
get_internal_keycode_restartpoint
CMP R3, #0 ; nothing in my buffer?
......@@ -2657,7 +2657,7 @@ trymenucursorkeys
BL checkhandle
BVS nothing
LDR r2, reversedmenu
CMP r2, #"\"
CMP r2, #"\\"
LDREQ r2, [handle, #w_wax0] ; get menu x
LDRNE r2, [handle, #w_wax1]
LDR r14, [handle, #w_icons]
......@@ -2814,7 +2814,7 @@ nullexit
;-----------------------------------------------------------
DeletePollTask ENTRY "R0,R1"
DeletePollTask Entry "R0,R1"
ADR R0,PollTasks ; Get -> start of polltask list
LDR R1,PollTaskPtr ; Get -> first free slot
01
......@@ -2845,7 +2845,7 @@ DeletePollTask ENTRY "R0,R1"
; [userblk,#4] = poll word contents, as read (once) by Wimp
scanpollwords ENTRY "R1-R4"
scanpollwords Entry "R1-R4"
ADR R1,PollTasks ; Get -> start of polltask list
LDR R2,PollTaskPtr ; Get -> first free slot
01
......@@ -3503,7 +3503,7 @@ not_alt
[ MultiClose
iconisenextwindow
ENTRY "R0-R4,handle"
Entry "R0-R4,handle"
LDR handle, nextwindowtoiconise
BL checkhandle ; make sure it's still valid
MOV R0, PC
......@@ -3558,7 +3558,7 @@ sendiconisemessages
; and if MultiClose enabled,
; R2 = mouse x
; R4 = mouse y
ENTRY
Entry
[ IconiseButton
; Send a Message_IconizeAt (RML)
......
......@@ -1893,7 +1893,7 @@ writedirreverse_len * .-writedirreverse
MOVGE R2,#WimpValidation_Display
BLGE findcommand
LDREQB R4,[R3],#1
TEQEQ R4,#"\"
TEQEQ R4,#"\\"
LDREQB R4,[R3]
Pull "R2"
......@@ -2980,7 +2980,7 @@ SWIWimp_ReadPixTrans
ASSERT ?pixtable_params =4*6
cachespritedata
ENTRY "R1-R2,R5-R7"
Entry "R1-R2,R5-R7"
MOV R2,#1
STRB R2,preservett ; entering critical period for pixtable
......@@ -3255,7 +3255,7 @@ area_System * 0
area_Wimp * 1
cachespriteaddress ROUT
ENTRY "R1,R3"
Entry "R1,R3"
[ debugsprite
LDR LR,spritename
......@@ -3717,7 +3717,7 @@ do_spriteop
calcinverse ROUT
ENTRY "R0-R7"
Entry "R0-R7"
ADR R7,inversefunc ; pointer to the transfer function
MOV R6,R1
......@@ -3775,7 +3775,7 @@ calcinverse ROUT
; out R0 modified RGB value - all other registers preserved
;------------------------------------------------------------------------------
inversefunc ENTRY "R1-R4"
inversefunc Entry "R1-R4"
MOV R4,#&FF ; mask used to extract the various components of the word
BIC R0,R0,R4 ; clear out the bottom bits
......@@ -3945,7 +3945,7 @@ inversefunc ENTRY "R1-R4"
; Out: R0 = modified palette entry
; all other registers preserved
;------------------------------------------------------------------------------
tintfunc ENTRY "R1-R8"
tintfunc Entry "R1-R8"
MOV R8, #&FF
MOV R3, R0, LSR #24 ; blue component
......@@ -4287,7 +4287,7 @@ yesdr2
;
forcedrag_off
ENTRY "R0-y1"
Entry "R0-y1"
;
LDRB R14, dragflag
CMP R14, #0
......@@ -4337,7 +4337,7 @@ forcedrag_off
EXIT
forcedrag_on
ENTRY "R0-y1"
Entry "R0-y1"
;
LDRB R14, dragflag
CMP R14, #0
......@@ -4422,7 +4422,7 @@ forcedrag_on
; Routines to call dottedbox1 and dottedbox from within an update_window loop
;
dottedbox_clipped
ENTRY "cx0, cy0, cx1, cy1, handle"
Entry "cx0, cy0, cx1, cy1, handle"
Debug autoscr, "Called dottedbox_clipped"
ADR R1, dottedbox
B %FT01
......@@ -5615,7 +5615,7 @@ calcw_checkwindow
; x0-y1 = bounding box of original window
; handle = window flags of original window, or those of its direct ancestor in this stack
; Exit: R0 has ws_top cleared if R1 window (or any window above it) overlapped original window
ENTRY
Entry
LDR R2, [R1, #ll_backwards]
CMP R2, #nullptr ; are we pointing at the list header?
BEQ %FT20
......@@ -5859,7 +5859,7 @@ calc_w_x0y0x1y1 ROUT
[ ChildWindows
calc_w_iconposn ENTRY "cx0,cy0,cx1,cy1"
calc_w_iconposn Entry "cx0,cy0,cx1,cy1"
BL calc_w_iconposn2
......@@ -5873,7 +5873,7 @@ calc_w_iconposn ROUT
]
ENTRY "R1,cx0,cy0,cx1,cy1" ; ChildWindows
Entry "R1,cx0,cy0,cx1,cy1" ; ChildWindows
Debuga x1,"Calc icon posn ",r0
;
......@@ -5984,7 +5984,7 @@ calc_w_iconposn ROUT
; Out x0,y0,x1,y1 = bounding box of border icon (without scrollbar adjustment for wf_inborder child windows)
; R0 preserved, R1,cx0,cy0,cx1,cy1 corrupted
calc_w_iconposn_R1 ENTRY "R1"
calc_w_iconposn_R1 Entry "R1"
] ; ChildWindows
......@@ -6363,7 +6363,7 @@ skipvscroll ; we must still consider the size and to
[ ChildWindows
minwindow_borders ENTRY "R1"
minwindow_borders Entry "R1"
MOV x0,#0
MOV y0,#0
......@@ -6664,12 +6664,12 @@ pushfontstring TraceL font
BLGE findcommand
[ UTF8
BLEQ checkvalid_getchar
TEQ R10, #"\"
TEQ R10, #"\\"
ADDEQ R3, R3, R9
BLEQ checkvalid_getchar
|
LDREQB R10, [R3], #1
TEQEQ R10, #"\"
TEQEQ R10, #"\\"
LDREQB R10, [R3]
]
; R10 = replacement character
......
......@@ -1440,7 +1440,7 @@ hotkey_nextwindow
; Exit: NE => R1 = next window to consider (down/across/up the window tree)
; EQ => no more windows (R1 corrupted)
; R2 always corrupted
ENTRY
Entry