home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Projekt:
- * Library-Modul "tmpnam"
- * Jens Gelhar 25.10.91
-
- execbase = 4
-
- xdef _tmpnam,tmpnam__Pc
- xref _DOSBase
-
- _tmpnam:
- tmpnam__Pc: movem.l d1/d2/a0/a1/a5/a6,-(a7)
- move.l 6*4+4(a7),a5
- move.l a5,d0
- bne.b t0
- lea buf,a5
- move.l a5,6*4+4(a7)
- t0 lea tmpstr(pc),a0
- t1 move.b (a0)+,(a5)+
- bne.b t1
- subq.l #1,a5
- move.l execbase.w,a0
- move.l 276(a0),d0 ; ThisTask
- moveq #7,d2
- bsr.b tsub
- addq.w #1,Count
- move.w Count,d0
- moveq #3,d2
- bsr.b tsub
- move.l _DOSBase,a6
- move.l #bufbuf,d1
- jsr -192(a6) ; DateStamp
- move.l bufbuf,d0
- moveq #4,d2
- bsr.b tsub
- move.l bufbuf+4,d0
- moveq #4,d2
- bsr.b tsub
- move.l bufbuf+8,d0
- moveq #3,d2
- bsr.b tsub
- clr.b (a5)
- movem.l (a7)+,d1/d2/a0/a1/a5/a6
- move.l 4(a7),d0
- rts
-
- tsub ; d0 in d2 "Ziffern" kodieren
- move.b #'_',(a5)+
- tsL moveq #15,d1
- and.w d0,d1
- add.b #'a',d1
- move.b d1,(a5)+
- lsr.l #4,d0
- dbra d2,tsL
- rts
-
- tmpstr: dc.b 't:TMP',0
-
- SECTION B,BSS
-
- bufbuf: blk.l 3
- Count: blk.w 1
- buf: blk.b 40
-
- end
-