Mercurial > hg > Members > kono > nitros9-code
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 |
rev | line source |
---|---|
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 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
21 section .text |
2474 | 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 |