Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
parameters are often passed fixed memory locations

Parameters are often passed fixed memory locations

Programming the 65816

0001

L123

KEEP

KL.12.3

0002
0003

START

0004

0 0 0 0

0005
0006
0007

0 0 0 2

SEP

# $ 2 0

0008
0009
STRING1
0010

0004

REP

# $ 1 0

0012
0013

0006

pass the address of STRING1 to PRSTRNG
LDX #STRING1
0014

0006 A21500

0015
JSR
0016
LDX #STRING2 pass the address of STRING2 to PRSTRNG
0017

OOOC A22800

0018

0 0 0 F 200080

JSR
0019
0020

0012 38

0021

0013 FB

0022
0023

0015

DC

0024 0015 54686973
0025 0028 54686973 STRING2
0026

003 B

0027
12
239
0028

; print a string of characters terminated by a 0 byte

0029

0 0 0 0

0030
PRSTRNG

START

0031
0032

0 0 0 0

0033
TOP LDA
get char at index position in string
0034
BEQ

if character is 0 , return

0035

0005 200080

JSR
0036
INX
0037

0009 80F5

BRA

TOP

0038
DONE
0039

END

0040

oooc

0041
1
0042
0043
1

machine-dependent routine to output a character

0 0 0 0

0044
0045
COUT
0046
ECOUT GEQU

$FDED

Apple // COUT

0047
PHA
0048
0049

0002 5A

PHY

0050
PHP
0051
SEC
0052

0005 FB

XCE

0053
JSR
0054

CLC.

0055

000A FB

XCE
0056
PLP
0057
PLY

restore registers

0058

000D FA

PLX
0059
0060

RTS

0061

0 0 1 0

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Beth Fox

PageId: ELI2E261B2