4 ; The `About this program' box (MDW)
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Standard header ------------------------------------------------------
32 ;----- External dependencies ------------------------------------------------
38 ;----- Icon numbers ---------------------------------------------------------
46 ;----- Main code ------------------------------------------------------------
48 AREA |Sapphire$$Code|,CODE,READONLY
52 ; On entry: R0 == pointer to purpose string
53 ; R1 == pointer to author string
54 ; R2 == pointer to version string
56 ; On exit: May return an error
58 ; Use: Displays an `About this program' dialogue box on the screen.
63 STMFD R13!,{R0-R3,R14} ;Save some registers
65 ; --- Create the dialogue box ---
67 ADR R0,pi__dbName ;Point to the name string
68 BL dbox_create ;Create the dialogue box
69 ADDVS R13,R13,#4 ;If error, don't restore R0
70 LDMVSFD R13!,{R1-R3,PC} ;Return any errors here
71 MOV R3,R0 ;Save the dialogue handle
73 ; --- Fill in the various fields ---
75 BL sapphire_appName ;Find the application's name
76 MOV R2,R0 ;Move pointer around nicely
77 MOV R0,R3 ;Get the dialogue handle
78 MOV R1,#piIcon__name ;The `Name' icon
79 BL dbox_setField ;Fill it in
80 LDR R2,[R13,#0] ;Get the purpose string
81 MOV R1,#piIcon__purpose ;The `Purpose' icon
82 BL dbox_setField ;Fill it in
83 LDR R2,[R13,#4] ;Get the author string
84 MOV R1,#piIcon__author ;The `Author' icon
85 BL dbox_setField ;Fill that in too
86 LDR R2,[R13,#8] ;Get the version string
87 MOV R1,#piIcon__version ;The `Version' icon
88 BL dbox_setField ;And fill that one in
90 ; --- Display the dialogue box and return ---
92 ADR R1,pi__dbHelp ;Point to the help string
93 MOV R2,#piIcon__title ;The embedded title icon
94 BL mbox ;Handle the dialogue box
95 LDMFD R13!,{R0-R3,R14} ;Restore the registers
96 BICS PC,R14,#V_flag ;Return without error
98 pi__dbName DCB "progInfo",0
99 pi__dbHelp DCB "piHELP"
101 ;----- Workspace ------------------------------------------------------------
105 ;----- That's all, folks ----------------------------------------------------