home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- * ST Blank - A general purpose screen blanking accessory/program*
- *****************************************************************
- * Language : 68000 assembler *
- * Assembler : Metacomco (Version 12.0) *
- * Version : 2.0.0 *
- * Date created : 1989/08/24 *
- * Last modified : 1991/09/28 *
- *****************************************************************
- * HISTORY *
- *****************************************************************
- * Ver * Date * Comments *
- *****************************************************************
- * 1.0.0 * 01/09/89 * First release *
- *****************************************************************
- * 1.0.1 * 01/09/89 * All A-Line variables are now saved and *
- * restored to prevent crashes in applications software *
- *****************************************************************
- * 1.0.2 * 02/09/89 * A-Line code replaced by own plotting code *
- * and stack size increased, both to prevent application crashes *
- *****************************************************************
- * 1.1.0 * 01/12/89 * Star table changed so that it will work on *
- * ST's with a 32-bit address bus (i.e. TT machine). Stars ON/OFF*
- * option added to dialogue, along with star speed selector. Full*
- * version information appears on accessory menu slot *
- *****************************************************************
- * 1.2.0 * 03/04/90 * Improved XBRA installation, and BIOS output*
- * to PRT, AUX, CON or MIDI is counted as "activity" *
- *****************************************************************
- * 1.2.1 * 03/04/90 * All key presses now detected by virtue of *
- * and IKBD interrupt handler. Since this same routine also *
- * handles mouse packets, the old mouse handler is not required, *
- * and button presses are now recognised, as is joystick movement*
- *****************************************************************
- * 1.2.2 * 04/04/90 * Error messages now output when ST Blank *
- * fails to install *
- *****************************************************************
- * 1.2.3 * 21/05/90 * Bug fixed in BIOS intercept that caused *
- * G+PLUS to crash *
- *****************************************************************
- * 1.3.0 * 24/09/90 * Save / Load config option added, some code *
- * reorganisation *
- *****************************************************************
- * 1.3.1 * 20/10/90 * BIOS TRAP handler modified to cope with the*
- * longer stack frame of the '010+ processors. *
- *****************************************************************
- * 2.0.0 * 28/09/91 * Split AUTO program and ACC/PRG version for *
- * greater flexibility and to fix crashes on TT *
- *****************************************************************
-
- INCLUDE "STBLANK.I" ST Blank definitions
-
- GO:
- move.l a7,a5
- move.l #USTK,a7
- move.l a0,prgtype A0 = 0 for programs, /= 0 for DAs
- tst.l prgtype
- bne acc_go Skip memory shrink if accessory
-
- prg_shrink:
- MOVE.L 4(A5),A5
- MOVE.L $C(A5),D0
- ADD.L $14(A5),D0
- ADD.L $14(A5),D0
- ADD.L #$100,D0
- MOVE.L D0,-(SP)
- MOVE.L A5,-(SP)
- MOVE.W D0,-(SP)
- MOVE.W #$4A,-(SP)
- TRAP #dos
- lea.l 12(sp),sp
-
- acc_go:
- pea inst_crit(pc) Do super mode installation bits
- move.w #38,-(sp)
- trap #xbios
- addq.l #6,sp tidy
-
- jsr appl_init Set up AES and
- move.l d0,appid store application ID
-
- bsr find_cookie Look for our cookie
- move.l shared,d0
- beq noshared If zero, no PRG part!
- bsr load_rsrc Load resource file & find tree addrs
- tst.l treeaddr errors?
- beq no_rsc Handle
-
- tst.l prgtype Accessory?
- beq cont_prg Skip this bit if not
-
- pea accname(pc) Name to appear on Desk menu
- move.l appid,-(sp) and application ID
- jsr menu_register put us on the Desk menu
- addq.l #8,sp tidy stack and ignore errors
- move.w d0,accid retrieve the accessory ID
-
-
- * Set up evnt_mesag call
-
- loop:
- clr.l -(sp)
- clr.l -(sp) Set arrow mouse
- jsr graf_mouse
- addq.l #8,sp
- tst.l prgtype Accessory?
- bne acc_loop Skip this if so
-
- jsr appl_exit Clear up AES
- move.w #0,-(sp)
- trap #dos Terminate
-
- acc_loop:
- pea msgbuff(pc) message buffer loc
- jsr evnt_mesag wait for message event
- addq.l #4,sp tidy stack
-
- lea msgbuff(pc),a0 get message buffer
- move (a0),d0 retrieve message code
- cmpi.w #40,d0 is it 'Open accessory' message?
- bne loop jif not
-
- move.w 8(a0),d0 get accessory that was opened
- cmp.w accid,d0 is it us?
- bne loop jif not so
-
- * We have been selected !
-
- cont_prg:
- lea infosave(pc),a1 Info save area
- move.l shared,a0
- moveq #6,d0 move 7 long words
- bsr move_them In case "Cancel" is clicked
- bsr reconfig Set up dialogue correctly
- clr.l -(sp)
- move.l #3,-(sp) Set pointed hand mouse
- jsr graf_mouse
- addq.l #8,sp
- bsr handle_dialogue
-
- dloop:
- bsr do_form Let AES handle form
- * Object selected is returned in d0
- and.w #$7FFF,d0 Ensure d0 is +ve
- cmp.w #STARON,d0 Stars ON button
- beq stars_on
- cmp.w #STAROFF,d0 Stars off button
- beq stars_off
-
- bsr deselect_object All other buttons deselected straight away
- cmp.w #OFF,d0 Turn off blank
- beq blank_off jif so
- cmp.w #OK,d0 Finished?
- beq ok set up blanking
- cmp.w #BNOW,d0 Blank now?
- beq blank_now
- cmp.w #TEST,d0 Test star speed?
- beq test_stars
- cmp.w #CANCEL,d0 Cancel
- beq use_old
- cmp.w #SDN,d0 - secs
- beq decsecs
- cmp.w #SUP,d0 + secs
- beq incsecs
- cmp.w #MDN,d0 - mins
- beq decmins
- cmp.w #MUP,d0 + mins
- beq incmins
- cmp.w #DLDEC,d0 Decrease star delay
- beq d_dec
- cmp.w #DLINC,d0 Increase star delay
- beq d_inc
- cmp.w #LOAD,d0
- beq load_config
- cmp.w #SAVE,d0
- beq save_config
- bra dloop and continue
-
-
- ok move.l shared,a6
- move.w #1,active(a6) Blanker active
- bra recalc
-
- inst_crit:
- move.w _bootdev,d0 Determine boot device
- add.b #"A",d0 Turn into a drive name
- move.b d0,save_name Insert in info file name
- rts
-
- save_config:
- bsr tick_cal
- move.l shared,a6
- move.w #1,active(a6) Install current defaults
-
- move.w #0,-(sp) Ordinary file
- pea save_name(pc) Name of file
- move.w #$3c,-(sp)
- trap #dos Create it
- addq.l #8,sp
-
- tst.w d0 Error?
- bmi s_err Abort if so
- beq s_err
-
- move.w d0,save_h Make note of handle returned
-
- move.l shared,-(sp) Start of buffer to save
- move.l #savelen,-(sp) Length of save info
- move.w save_h,-(sp) File handle
- move.w #$40,-(sp) Fwrite
- trap #dos
- lea.l 12(sp),sp tidy stack
- tst.l d0
- bmi s_err Save error
- cmp.l #savelen,d0 All information saved?
- bne s_err_r abort if not
-
- move.w save_h,-(sp) Close file
- move.w #$3E,-(sp)
- trap #dos
- addq.l #4,sp tidy
- tst.w d0 Error?
- bmi s_err
-
- pea save_ok(pc) File error alert
- move.l #1,-(sp) Cancel is default
- jsr form_alert
- addq.l #8,sp tidy
-
- move.w #MAIN,d0 Redraw whole dialogue
- bsr redraw
- bra dloop Continue dialogue loop
-
- s_err_r:
- * Get here when an error occurs, but file is still open
-
- bsr open_file_err
- pea save_name(pc) Name of file
- move.w #$41,-(sp) Delete it
- trap #dos
- addq.l #6,sp tidy
-
- s_err
- bsr closed_file_err
- bra dloop
-
-
- load_config:
- bsr file_load Try to load file
- move.w #MAIN,d0 Redraw the lot
- bsr redraw
- bra dloop Continue dialogue interaction
-
- file_load:
- move.w #1,-(sp) Open file for reading
- pea save_name(pc)
- move.w #$3D,-(sp)
- trap #dos
- addq.l #8,sp
-
- tst.w d0 Errors?
- bmi l_err Handle if so
- move.w d0,save_h Make note of handle returned
- move.l shared,-(sp) Start of buffer to load
- move.l #savelen,-(sp) Length of load info
- move.w save_h,-(sp) File handle
- move.w #$3F,-(sp) Fread
- trap #dos
- lea.l 12(sp),sp tidy stack
- tst.l d0
- bmi l_err_r load error
- cmp.l #savelen,d0 All information saved?
- bne l_err_r abort if not
-
- move.w save_h,-(sp) Close file
- move.w #$3E,-(sp)
- trap #dos
- addq.l #4,sp tidy
- tst.w d0 Error?
- bmi l_err_r
-
- reconfig:
- move.w #STARON,d0 Stars on button
- bsr select_object
- move.w #STAROFF,d0 Stars off button
- bsr deselect_object
- lea enable_object(pc),a5
- bsr delay_set Enable all star delay buttons
- bsr delay_remake
- bsr time_remake
- bsr tick_cal
- move.l shared,a6
- move.w star_disp(a6),d0 Star display flag
- bne stars_are_off
- rts
-
- stars_are_off:
- move.w #STAROFF,d0
- bsr select_object
- move.w #STARON,d0
- bsr deselect_object
- lea disable_object(pc),a5
- bsr delay_set
- rts
-
- l_err
- * Get here if file open failed
-
- bsr closed_file_err Tell user
- bra install_defaults
-
- l_err_r
- * Get here if file read failed
- bsr open_file_err Tell user
-
- install_defaults:
- move.l shared,a6
- move.b #2,mins(a6) Default 2 mins
- move.b #0,secs(a6) 0 seconds
- move.l #24000,timeout(a6) Equivalent in 5ms units
- move.w #14,star_delay(a6)
- move.w #1,active(a6) Default is to be active
- clr.w star_disp(a6) With stars on
- clr.w lselect(a6) No last button
- bra reconfig
-
- open_file_err:
- move.w save_h,-(sp) Close save file
- move.w #$3E,-(sp)
- trap #dos
- addq.l #4,sp ignore errors
-
- closed_file_err:
- * Get here when file error occurs, but file is not open
-
- pea save_error(pc) File error alert
- move.l #1,-(sp) Cancel is default
- jsr form_alert
- addq.l #8,sp tidy
- rts
-
- test_stars:
- bsr tick_cal
- move.l shared,a6
- move.w #1,active(a6)
- clr.l counter(a6) Should blank screen now
- move.w #TEST,d0
- bsr redraw Redraw button
- bra dloop
-
- blank_now:
- bsr tick_cal Calculate ticks
- bsr remove_dialogue
- move.l shared,a6
- move.w #1,active(a6)
- clr.l counter(a6) Should blank screen now
- bra loop
-
- use_old
- * Cancel clicked
- lea infosave(pc),a0
- move.l shared,a1
- moveq #6,d0 Move 7 longs
- bsr move_them
- bsr remove_dialogue
- bra loop
-
- move_them:
- move.l (a0)+,(a1)+
- dbf d0,move_them
- rts
-
- stars_on:
- move.l shared,a6
- clr.w star_disp(a6) Zap star display flag
- lea enable_object(pc),a5
- bsr delay_set Set status of buttons
-
- rdrw:
- move.w #DUPDATE,d0 Object to redraw (IBOX containing above)
- bsr redraw
- bra dloop
-
- stars_off:
- move.l shared,a6
- bset #3,star_disp(a6) Set star disp flag
- lea disable_object(pc),a5
- bsr delay_set
- bra rdrw
-
- delay_set:
- * A5 holds address of routine to call for each object
- move.w #DLDEC,d0 Enable various GEM objects
- jsr (a5)
- move.w #DLINC,d0
- jsr (a5)
- move.w #DELAY,d0
- jsr (a5)
- move.w #TEST,d0
- jsr (a5)
- rts
-
- d_dec
- bsr object_enabled
- bne dloop If object is disabled, ignore request
- move.l shared,a6
- move.w star_delay(a6),d0 get delay
- subq.w #1,d0 Subtract one
- beq dloop If zero, ignore request
- move.w d0,star_delay(a6) Otherwise, resave
- bra d_redraw and display
-
- d_inc
- bsr object_enabled Object disabled?
- bne dloop If so, ignore request
- move.l shared,a6
- move.w star_delay(a6),d0 get delay
- addq.w #1,d0 Add one
- cmp.w #100,d0 Upper limit ?
- beq dloop Ignore request if so
- move.w d0,star_delay(a6) Otherwise resave
- * and fall through to ...
-
- d_redraw
- bsr delay_remake Convert to decimal string
- move.w #DELAY,d0 and redraw
- bsr redraw
- bra dloop
-
- delay_remake:
- move.l shared,a6
- move.w star_delay(a6),d0 Get delay value
- move.l tdelay,a0 Address of delay string
- bsr makenum convert d0 to number
- clr.b (a0)+ Zero terminate
- rts
-
- decsecs:
- move.l shared,a6
- move.b secs(a6),d0 Get seconds
- tst.b d0 Seconds=0 ?
- beq prop_d Propogate if so
- subq.b #1,d0 Decrement seconds
- subq.b #1,secs(a6)
- tst.b mins(a6) Minutes zero as well?
- beq chk_secs
- touch_s move.b d0,secs(a6) Save it
- bsr touch Redisplay
- bra dloop
-
- prop_d
- tst.b mins(a6) Minutes=0?
- beq touch_s If so, can't propogate
- move.b #59,secs(a6) 59 seconds
- bra decmins
-
- incsecs
- move.l shared,a6
- move.b secs(a6),d0 Get seconds
- addq.b #1,d0 increment
- cmp.b #60,d0 60 secs?
- bhs prop handle it
- bra touch_s save secs + redraw
-
- prop clr.b secs(a6) Zero seconds
- bra incmins
-
- decmins move.l shared,a6
- move.b mins(a6),d0 Get minutes
- tst.b d0 Zero minutes?
- beq touch_m
- subq.b #1,d0 Decrement mins
- beq chk_secs If zero minutes, check seconds too
- touch_m move.b d0,mins(a6)
- bsr touch
- bra dloop
-
- incmins:
- move.l shared,a6
- move.b mins(a6),d0 Get minutes
- cmp.b #99,d0 99 mins
- bhs touch_m Can't increment if so
- addq.b #1,d0 Else increment
- bra touch_m
-
- chk_secs
- clr.b d0 Zero minutes
- move.b secs(a6),d1 Get seconds
- cmp.b #base_secs,d1 Below 10 seconds?
- blo set_10 sort it out if so
- bra touch_m Otherwise, all OK
-
- set_10
- move.b #base_secs,secs(a6) Set seconds to one
- bra touch_m
-
- time_remake:
- clr.l d0
- move.l shared,a6
- move.b secs(a6),d0
- move.l tsecs,a0 Get address of seconds display
- bsr makenum Convert to number
- clr.b (a0) Zero terminate
- clr.l d0
- move.b mins(a6),d0
- move.l tmins,a0
- bsr makenum
- clr.b (a0)
- rts
-
- touch:
- bsr time_remake
- move.w #UPDATE,d0 Object to start redrawing from
-
- * Fall through to ...
-
- redraw:
-
- * Entered with the object to start redrawing from in d0
-
- move.w d0,-(sp) Save d0
- move.w #37,-(sp) Vsync
- trap #xbios
- addq.l #2,sp tidy
- move.w (sp)+,d0 Get d0 back
-
- * Re-display seconds+mins + return
- move.l h,-(sp)
- move.l w,-(sp)
- move.l y,-(sp)
- move.l x,-(sp)
- move.l #2,-(sp) Depth of two
- move.l d0,-(sp) Update object
- move.l treeaddr,-(sp) Address of tree
- jsr objc_draw
- lea 28(sp),sp tidy stack
- rts
-
- blank_off
- move.l shared,a6
- clr.w active(a6)
- bsr remove_dialogue
- bra loop
-
- recalc:
- bsr tick_cal
- bsr remove_dialogue
- bra loop All done
-
- tick_cal:
- move.l shared,a6
- clr.l d0 Ensure d0 zero
- move.b mins(a6),d0 Number of minutes
- mulu #60,d0 Convert to seconds
- move.b secs(a6),d1 get seconds
- ext.w d1 make into a word
- add.w d1,d0 Add seconds
- mulu #200,d0 convert to timer ticks
- move.l d0,timeout(a6) save it
- * Fall through to
-
- activity:
- move.l shared,a6
- move.l timeout(a6),counter(a6) Reset the counter
- rts
-
- noshared
- pea noprgpart(pc) No PRG part!
- move.l #1,-(sp) Default button
- jsr form_alert
- addq.l #8,sp
- bra fatal Can't continue
-
- no_rsc:
- pea rsrc_errmsg(pc)
- move.l #1,-(sp)
- jsr form_alert Tell user there's no RSC
- addq.l #8,sp
-
- fatal:
- tst.l prgtype
- beq loop If program, terminate
-
- * For accessory, fall through to endless loop
-
- endless pea msgbuff(pc)
- jsr evnt_mesag Call evnt_mesag
- addq.l #4,sp
- bra endless endlessly.
-
- * This is the only safe way to terminate a desk accessory
-
- calcaddr:
- move.l treeaddr,a0 Get address of tree
- moveq #ob_size,d1 Size of each object
- mulu d1,d0 Calcuate offset into tree
- lea 12(a0,d0.w),a0 Get address of pointer to TEDINFO
- move.l (a0),a0 Get address of TEDINFO
- move.l (a0),d0 Get address of text from TEDINFO
- rts All done
-
- handle_dialogue:
- pea h+2 width, height, x and y coords
- pea w+2 of dialogue box
- pea y+2
- pea x+2
- move.l treeaddr,-(sp) Address of tree
- jsr form_center centre form
- lea.l 20(sp),sp tidy stack
-
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l #10,-(sp) From unit height
- move.l #10,-(sp) and width,
- move.l #10,-(sp) top left hand start
- move.l #10,-(sp)
- jsr graf_growbox Do it
- lea 32(sp),sp tidy stack
-
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l #0,-(sp) FMD_START
- jsr form_dial Reserve screen portion
- lea 36(sp),sp tidy stack
-
- move.l #3,-(sp) BEG_MCTRL
- jsr wind_update now
- addq.l #4,sp tidy
-
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l #4,-(sp) Depth of 4
- move.l #0,-(sp) Start with object zero
- move.l treeaddr,-(sp) Address of tree
- jsr objc_draw Display our form
- lea 28(sp),sp tidy stack
- rts
-
- do_form:
- clr.l -(sp) No editable objects
- move.l treeaddr,-(sp) Address of tree
- jsr form_do interact with form
- addq.l #8,sp tidy
- rts
-
- deselect_object:
- move.l d0,-(sp) Save d0
- bsr get_button_status
- bclr #0,d1 Deselect object
- move.w d1,10(a0,d0.w) and save
- move.l (sp)+,d0 Get d0 back
- rts
-
- select_object:
- move.l d0,-(sp) Save d0
- bsr get_button_status
- bset #0,d1 Select object
- move.w d1,10(a0,d0.w) and save
- move.l (sp)+,d0 Get d0 back
- rts
-
- get_button_status:
- moveq #ob_size,d1 Size of objects
- move.l treeaddr,a0 Start of form
- mulu d1,d0 Calc offset of object
- move.w 10(a0,d0.w),d1 Get object status
- rts
-
- remove_dialogue:
- move.l h,-(sp) From height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l #10,-(sp) To unit height
- move.l #10,-(sp) and width,
- move.l #10,-(sp) top left hand start
- move.l #10,-(sp)
- jsr graf_shrinkbox Do it
- lea 32(sp),sp tidy stack
-
- move.l #2,-(sp) END_MCTRL
- jsr wind_update now
- addq.l #4,sp tidy
-
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l h,-(sp) Final height,
- move.l w,-(sp) width,
- move.l y,-(sp) y,
- move.l x,-(sp) and x
- move.l #3,-(sp) FMD_FINISH
- jsr form_dial Reserve screen portion
- lea 36(sp),sp tidy stack
-
- rts All done!
-
- enable_object:
- bsr get_button_status
- bclr #3,d1 Clear disabled bit
- move.w d1,10(a0,d0.w)
- rts
-
- disable_object:
- bsr get_button_status
- bset #3,d1
- move.w d1,10(a0,d0.w)
- rts
-
- object_enabled:
- * GEM object in d0 enabled?
- moveq #ob_size,d1 Size of objects
- move.l treeaddr,a0 Start of form
- mulu d1,d0 Calc offset of object
- move.w 10(a0,d0.w),d1 Get object status
- btst #3,d1 Disabled?
- rts
-
-
- makenum:
-
- * Convert word in d0 into string of decimal digits. A0 should
- * point to the buffer the digits are to be placed in. Afterwards
- * a0 will point to the next free location in the buffer.
-
- * d0,d1,d2,a0 corrupted
-
- tst.w d0 Check for zero
- beq zero special case
- move.l #100000,d1 Start with 100000
- 3$ divu #10,d1 divide by ten
- cmp.w d1,d0 is d0<d1?
- blo 3$ jifso
- 1$ bsr f_digit convert to digit & store
- cmp.w #1,d1 was that the units just converted?
- beq 2$ if so, we're done
- divu #10,d1 next digit
- bra 1$ and do it all again
-
- 2$ rts return
-
- zero moveq.l #1,d1 divisor
- bra f_digit convert to digit & return
-
- f_digit:
- move.b #"0",d2 set d2 digit to 0
- 1$ cmp.w d1,d0 is d0 smaller than d1?
- blo cvted if so, this digit converted
- sub.w d1,d0 take d1 from d0
- addq.l #1,d2 Increment digit
- bra 1$ do again
-
- cvted: move.b d2,(a0)+ stuff in buffer
- rts return
-
- load_rsrc:
- clr.l treeaddr Default to failure
- pea rsrc_name(pc) filename of our resource
- jsr rsrc_load Try to load it
- addq.l #4,sp tidy stack
- tst.w d0 Error
- beq rerror jif so
-
- pea treeaddr(pc) address of tree
- move.l #MAIN,-(sp) MAIN dialogue box
- move.l #0,-(sp) It's a tree
- jsr rsrc_gaddr get address
- lea.l 12(sp),sp tidy stack
-
- move.l shared,a6 Pointer to shared memory
- move.w #MINS,d0 Minutes index
- bsr calcaddr Calculate addr of TEDINFO string
- move.l d0,tmins save pointer
- move.l d0,a0
- clr.w d0
- move.b mins(a6),d0
- bsr makenum
- clr.b (a0)
-
- move.w #SECS,d0 Seconds index
- bsr calcaddr Calculate addr of TEDINFO
- move.l d0,tsecs save pointer
- move.l d0,a0
- clr.w d0
- move.b secs(a6),d0
- bsr makenum
- clr.b (a0)
-
- move.w #DELAY,d0 Delay counter
- bsr calcaddr find TEDINFO address
- move.l d0,tdelay save
- move.l d0,a0
- clr.w d0
- move.w star_delay(a6),d0
- bsr makenum
- clr.b (a0)
-
- move.w #STARON,lselect(a6)
- rts All done
-
- rerror clr.l treeaddr Signal RSC load fail
- rts
-
- find_cookie:
- * Search cookie jar to find our shared memory
- clr.l shared Default to not found
- pea search_jar(pc)
- move.w #supexec,-(sp)
- trap #xbios
- addq.l #6,sp
- rts
-
- search_jar:
- move.l _p_cookies,d0 Get pointer to cookie jar
- beq noshare If no jar, no shared memory
- move.l d0,a0
- check_cookie:
- move.l (a0)+,d0
- move.l (a0)+,d1
- tst.l d0
- beq noshare If end of jar found, no shared mem
- cmp.l #ourcookie,d0 Found our cookie?
- bne check_cookie
- move.l d1,shared Found our shared memory
- noshare:
- rts
-
-
- *************************************************************************
- *** DATA SECTION ***
- *************************************************************************
-
- * External GEM references for the GEMLIB.BIN file
-
- XREF appl_init,appl_exit,menu_register,evnt_mesag
- XREF form_do,form_dial,objc_draw,wind_update
- XREF rsrc_load,rsrc_gaddr,form_center,graf_mouse
- XREF graf_growbox,graf_shrinkbox,form_alert
-
- accname dc.b ' ST Blank V2.0.0 ',0 Name for desk menu
- rsrc_name
- dc.b 'STBLANK.RSC',0
- save_name:
- dc.b 'A:\STBLANK.INF',0
- save_h:
- ds.w 1 File handle for save/load
- save_error:
- dc.b '[3][ | ST Blank error: |'
- dc.b 'Error accessing config file]'
- dc.b '[ OK ]',0
- rsrc_errmsg:
- dc.b '[3][ | ST Blank error: |'
- dc.b ' Could not load RSC file ]'
- dc.b '[ Shame! ]',0
- noprgpart:
- dc.b '[3][ | The memory resident AUTO |'
- dc.b 'folder part of ST Blank has|'
- dc.b ' not been installed. ]'
- dc.b '[ Shame! ]',0
- save_ok dc.b '[1][ | Current configuration |'
- dc.b ' installed and saved. ]'
- dc.b '[ OK ]',0
-
- appid ds.l 1 Application ID
- accid ds.w 1 Desk accessory ID tag
- msgbuff ds.w 16 Message buffer
-
- shared ds.l 1 Pointer to shared data
- prgtype ds.l 1 Program type
-
- base_secs equ 1 Smallest no. of seconds to allow before blanking
-
- * Shared data offsets
- mins equ 0 No. of minutes
- secs equ 1 and secs to blankout
- timeout equ 2 Time constant for countdown, set by user
- star_delay equ 6 Delay as displayed to user
- active equ 8 <>0 if blanking enabled
- filler equ 10 Filler for backward compatibility
- star_disp equ 12 0 = Display stars
- * n = Don't display stars
- lselect equ 14 Last radio button selected
-
- counter equ 16 Running countdown decremented by 200Hz interrupt
- timer equ 20 Counter incremented by 200Hz interrupt
- khandl equ 22 Address of IKBD interrupt vector
- sp_list equ 26 List of pointers to pointers of star coordinates
-
- omins ds.b 1 Saved versions of mins and secs, in case
- osecs ds.b 1 of cancel by user
-
- ierror ds.w 1 Initialisation error flag
-
- tmins ds.l 1 Pointer to minutes display
- tsecs ds.l 1 Pointer to seconds display
-
- tdelay ds.l 1 Pointer to delay text display
- odelay dc.w 29 Place to save star_delay in case of cancel
-
- treeaddr ds.l 1 pointer to object tree
- x dc.l 0 x,y and size of dialogue box
- y dc.l 0
- w dc.l 0
- h dc.l 0
-
-
- infosave ds.l 13 13 word save area
- ds.l 55
- USTK ds.l 1 Stack of 56 long_words
-
- END
-
-