annotate lib/alib/mktemp.as @ 3016:eb04ba1c507f

[PATCH 3/3] level2: Include ccbkrn in build again From ec3a9e79eeb1a8bd3b703e4ea9c28ccbb2d641d5 Mon Sep 17 00:00:00 2001 --- level2/coco3/makefile | 24 ++++++++++++------------ level2/coco3/modules/makefile | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-)
author Brett Gordon <beretta42@gmail.com>
date Wed, 29 Oct 2014 23:12:52 +0100
parents 03f26e88b809
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 ******************************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2 *
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * This subroutine creates a temorary filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * by adding a "." and a 2digit hex value based
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * on the process id.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * IMPORTANT: there must be room after the filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 * for at least 6 bytes!! Filename must be variable
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * area, not parameter or program sections!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * OTHER MODULES NEEDED: BIN_HEX
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * ENTRY: X= filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14 * EXIT: no registers (expect cc) modified
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15 * filename ends in ".processid",$0d
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 nam Make Unique Filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2474
diff changeset
21 section .text
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 MKTEMP:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 pshs d,x,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 OS9 F$PrsNam find end of name
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 tfr y,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 lda #'.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 sta ,x+ put "." in name
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 OS9 F$ID
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 tfr a,b convert to 4 digit hex
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 lbsr BIN2HEX
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 std ,x++
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 lda #$0d end name with cr
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 sta ,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 puls d,x,y,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40 endsect