annotate level1/cmds/build.asm @ 3295:6b7a7b233925 default tip

makefile: Allow PORTS with level1/2 mix https://sourceforge.net/p/nitros9/feature-requests/10/
author Tormod Volden <debian.tormod@gmail.com>
date Tue, 19 Apr 2022 18:12:17 +0200
parents 84ea83668304
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * Build - Simple text file creation utility
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 918
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 918
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 918
diff changeset
9 * 6 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 918
diff changeset
10 * From Tandy OS-9 Level Two VR 02.00.01.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 nam Build
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 ttl Simple text file creation utility
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 * Disassembled 98/09/10 23:19:12 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 atrv set ReEnt+rev
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 918
diff changeset
23 rev set $00
188
fad2545d83fc build and copy are now from OS-9 Level Two
boisy
parents: 0
diff changeset
24 edition set 6
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27
918
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
28 fpath rmb 1
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
29 linebuff rmb 128
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
30 stack rmb 450
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 name fcs /Build/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35
188
fad2545d83fc build and copy are now from OS-9 Level Two
boisy
parents: 0
diff changeset
36 *start ldd #(WRITE.*256)+PREAD.+UPDAT. Level One edition 5 line
fad2545d83fc build and copy are now from OS-9 Level Two
boisy
parents: 0
diff changeset
37 start ldd #(WRITE.*256)+UPDAT.
918
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
38 os9 I$Create create file
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
39 bcs Exit branch if error
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
40 sta <fpath else save path to file
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
41 InpLoop lda #1 stdout
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
42 leax <Prompt,pcr point to prompt
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
43 ldy #PromptL and size of prompt
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
44 os9 I$WritLn write line
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
45 clra stdin
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
46 leax linebuff,u point to line buffer
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
47 ldy #128 and max read size
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
48 os9 I$ReadLn read line
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
49 bcs Close branch if error
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
50 cmpy #$0001 1 byte read?
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
51 beq Close if so, must be CR, exit
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
52 lda <fpath else get file path
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
53 os9 I$WritLn write line to file
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
54 bcc InpLoop branch if ok
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
55 bra Exit else exit
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
56 Close lda <fpath get file path
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
57 os9 I$Close close it
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
58 bcs Exit branch if erro
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
59 clrb else clear carry
66fe834fdbb9 Added comments
boisy
parents: 200
diff changeset
60 Exit os9 F$Exit and exit normally
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 Prompt fcc "? "
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 PromptL equ *-Prompt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68