(format t “Hello ~a” 'World). If I’m on vacation and come back to the land of C based languages I will have reverted to the only syntax I enjoy working in.
lda #0 ; Load accumulator with character code for NULL sta $0400 ; Store it in the screen memory to clear the screen ldx #0 ; Initialize X register to 0 loop lda message,x ; Load the next character from the message beq done ; If the character is NULL (end of string), we are done sta $0400,x ; Store the character in the screen memory inx ; Increment X register bne loop ; Branch back to the loop done rts ; Return from subroutine message .text "Hello World!",0 ; Null-terminated string
WhatAmLemmy
in reply to Anders Rytter Hansen • • •like this
d_k_bo, Stety, darcy, FlembleFabber, exu, Jack3G, Number358, Flexaris, tordenflesk, pizzaiolo, perdido, Miautteo, colderr, RandomVideos, visor841, Lux, hoerbinator, einsteinx2, scriblemelego, Unimeron, OrnatePotato, sino, Hrvatskii, Anders Rytter Hansen, Fishandchips321, goodnessme, t0mm13b, codapine, captainskipper, lackthought, KevonLooney, ChillPenguin, InvertedParallax and normal_user like this.
Dasnap
in reply to Anders Rytter Hansen • • •like this
Jack3G, pizzaiolo, Adel Khial, CloverSi, P1r4nha, SigmarStern, RandomVideos, Kelo, ZeroHora, hoerbinator, einsteinx2, scriblemelego, Unimeron, sino, Anders Rytter Hansen, goodnessme, ChillPenguin and InvertedParallax like this.
LazaroFilm
in reply to Anders Rytter Hansen • • •Solved it.
like this
KEISEI Skyliner Enjoyer, andrefsp, codapine, captainskipper, lackthought, QubitN, Anders Rytter Hansen, TheTeej107 and TonyTonyChopper like this.
Anders Rytter Hansen
in reply to LazaroFilm • •giant_smeeg
in reply to Anders Rytter Hansen • • •like this
Jamoke, captainskipper, ChillPenguin, QubitN, Anders Rytter Hansen, lugal, InvertedParallax, TheTeej107 and QuestionMark like this.
cryoistalline
in reply to Anders Rytter Hansen • • •index[array]
like this
InvertedParallax, Anders Rytter Hansen and MsFlammkuchen like this.
nthcdr
in reply to Anders Rytter Hansen • • •grin
in reply to nthcdr • • •sta $0400 ; Store it in the screen memory to clear the screen
ldx #0 ; Initialize X register to 0
loop lda message,x ; Load the next character from the message
beq done ; If the character is NULL (end of string), we are done
sta $0400,x ; Store the character in the screen memory
inx ; Increment X register
bne loop ; Branch back to the loop
done rts ; Return from subroutine
message .text "Hello World!",0 ; Null-terminated string
cs127
in reply to Anders Rytter Hansen • • •