Skip to content

Instantly share code, notes, and snippets.

@Harry2101
Created September 8, 2019 01:58
Show Gist options
  • Save Harry2101/8e21974bcd7e6ac365527e5599ff835b to your computer and use it in GitHub Desktop.
Save Harry2101/8e21974bcd7e6ac365527e5599ff835b to your computer and use it in GitHub Desktop.
; Haree Akkala
; 914866026
; title()
.equ @, $000
.equ stack, $100
.equ str_start, $200
.equ str_2_start, $210
lds# stack
ldf# 0
psh# str
psh# strlen
psh# str2
jsr title
ads# 3
hlt
str: .equ @, str_start
.char 'lEArN pYtHOn iN 30 YeaRS!', strlen
str2: .equ @, str_2_start
.blkw strlen
.equ @, $020
.equ input, 4
.equ len, 3
.equ output, 2
title: pshf
tsf
psha
pshx
ldx# 0
loop: cmx ! len
jge end
ldc* ! input
cma# ' '
jeq space
cma# 'a'
next: stc* ! output
adx# 1
jmp loop
space: clr start
jmp next
end: popx
popa
popf
rtn
start: .word 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment