Download Merlin 128 manual

Transcript
Merlin 128 User's Manual
1
2
3
4
5
6
7
8
9
10
11
12
13
The Assembler
*******************
* MULTIPLE ORG'S *
* SOLUTION # 1 *
* DSK COMMAND *
*******************
DSK
ORG
LDA
"FIIEONE"
$8000
#0
DSK
ORG
LDY
"FILETWO"
$8100
#1
In this second example, two separate disk files are again created with independent ORG
values, but this time by using the SAV command. This command directs the assembler to
save all code assembled previous to the SAV code disk.
1
2
3
4
5
6
7
8
9
10
11
12
13
*******************
* MULTIPLE ORG'S *
* SOLUTION # 2 *
* SAV COMMAND *
*******************
ORG
LDA
SAV
$8000
#0
"FILEONE"
ORG
LDY
SAV
$8100
#1
"FILETWO"
In this last example, just one file is created on disk, but the two blocks of code are
separated by approximately a $100 byte gap (less the size of the first code block, of
course).
Please read the section on SAV for more information about multiple ORGs in a program.
2
3
4
5
6
7
8
9
10
Page 58
*******************
* MULTIPLE ORG'S *
* SOLUTION # 3 *
* DS COMMAND *
*******************
ORG
LDA
DS ↑
LDY
$8000
#0
; or could have been DS $8100-*
#1