2474
|
1 ******************************************
|
|
2 *
|
|
3 * This subroutine creates a temorary filename
|
|
4 * by adding a "." and a 2digit hex value based
|
|
5 * on the process id.
|
|
6 * IMPORTANT: there must be room after the filename
|
|
7 * for at least 6 bytes!! Filename must be variable
|
|
8 * area, not parameter or program sections!!!
|
|
9
|
|
10 * OTHER MODULES NEEDED: BIN_HEX
|
|
11
|
|
12 * ENTRY: X= filename
|
|
13
|
|
14 * EXIT: no registers (expect cc) modified
|
|
15 * filename ends in ".processid",$0d
|
|
16
|
|
17 nam Make Unique Filename
|
|
18 ttl Assembler Library Module
|
|
19
|
|
20
|
|
21 psect MKTEMP,0,0,0,0,0
|
|
22
|
|
23 MKTEMP:
|
|
24 pshs d,x,y
|
|
25
|
|
26 OS9 F$PrsNam find end of name
|
|
27 tfr y,x
|
|
28
|
|
29 lda #'.
|
|
30 sta ,x+ put "." in name
|
|
31
|
|
32 OS9 F$ID
|
|
33 tfr a,b convert to 4 digit hex
|
|
34 lbsr BIN2HEX
|
|
35 std ,x++
|
|
36 lda #$0d end name with cr
|
|
37 sta ,x
|
|
38 puls d,x,y,pc
|
|
39
|
|
40 endsect
|