Update lesson1a.txt

This commit is contained in:
John Snape 2019-06-27 02:25:50 -07:00 committed by GitHub
parent 3315489ceb
commit 52834d1929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 13 deletions

View File

@ -6,35 +6,35 @@ FDF0- 8 cout .eq $fdf0
0900- 11 * part 1
0900-A9 C1 12 lda #"A" ; spelling out "APPLE"
0902-20 F0 FD 13 jsr cout ; and outputting using
0905-A9 D0 14 lda #"P" ; the built-in monitor
0905-A9 F0 14 lda #"p" ; the built-in monitor
0907-20 F0 FD 15 jsr cout ; routines
090A-20 F0 FD 16 jsr cout ; directly printing
090D-A9 CC 17 lda #"L" ; one letter at a time
090D-A9 EC 17 lda #"l" ; one letter at a time
090F-20 F0 FD 18 jsr cout
0912-A9 C5 19 lda #"E"
0912-A9 E5 19 lda #"e"
0914-20 F0 FD 20 jsr cout
0917-60 21 rts
0918- 22
0918- 23 * part 2
0918-A2 05 24 ldx #$05 ; the number of letters
091A-BD 24 09 25 more2 lda text,x ; place in acc like before
091A-BD 23 09 25 more2 lda text-1,x ; place in acc like before
091D-20 F0 FD 26 jsr cout ; print it
0920-CA 27 dex ; decrease x-index register by one (1)
0921-10 F7 28 bpl more2 ; still have more to print
0920-CA 27 dex ; decrease x-index register by one (1)
0921-D0 F7 28 bne more2 ; still have more to print
0923-60 29 done rts
0924-C5 CC D0 D0
C1 30 text .hs c5ccd0d0c1 ; ELPPA (backwards APPLE)
0924-E5 EC F0 F0
C1 30 text .hs e5ecf0f0c1 ; elppA (backwards Apple)
0929- 31
0929- 32 * part 3
0929-A2 00 33 ldx #$00 ; load our index with zero
092B-BD 36 09 34 more3 lda text2,x ; grab the text form below
092E-F0 F3 35 beq done ; if it's 00, no more text
0930-20 F0 FD 36 jsr cout ; print it
0933-E8 37 inx ; get next letter
0933-E8 37 inx ; get next letter
0934-D0 F5 38 bne more3 ; branch if x is not equal to zero (0)
0936-C1 D0 D0 CC
C5 00 39 text2 .hs c1d0d0ccc500 ; text in order (APPLE)
093C- 40
0936-C1 F0 F0 EC
E5 00 39 text2 .hs c1f0f0ece500 ; text in order (Apple)
093C- 40 ; with trailing zero (0)
093C- 41 * part 4
0000- 42 zploc .eq $00 ; define our zero-page address
093C-A9 36 43 lda #text2 ; put the pointer in zero-page
@ -45,7 +45,8 @@ FDF0- 8 cout .eq $fdf0
0946-B1 00 48 more4 lda (zploc),y ; grab indirect index to our text
0948-F0 D9 49 beq done ; if zero (0) then exit
094A-20 F0 FD 50 jsr cout ; print it!
094D-C8 51 iny ; increment our index to get the next letter
094D-C8 51 iny ; increment our index to get the next letter
094E-D0 F6 52 bne more4 ; branch of y is not zero (0)
0950- 53
0950- 54 PROG_END