; Scott Dial ; wrath@calc.org ; http://tcpa.calc.org ; 66 bytes makePigLatin: ld de,WORD push de PLfindVowel: ld a,(de) set 5,a ;to lower case ld hl,vowels ld bc,6 cpir jr z,PLfindVowelDone inc de jr PLfindVowel PLfindVowelDone: pop hl push hl push de ld c,$2D ld a,e sub l jr z,PLmakeW PLreturn: ld hl,TEMP ;de = rest of word call PLcopyStr ;hl = end of temp TEMP[] = "ig" ld (hl),c ;TEMP[] = "ig-" inc hl xor a pop de ld (de),a ;WORD[] = "p",0 pop de call PLcopyStr ld de,ay PLcopyStr: ; from de to hl ld a,(de) ld (hl),a or a ret z inc de inc hl jr PLcopyStr PLmakeW: ld c,$77 jr PLreturn vowels .db "eiou" ay .db "ay",0