Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
feat: update hello_username program
Browse files Browse the repository at this point in the history
  • Loading branch information
FEgor04 committed Jun 14, 2024
1 parent 345e256 commit bd69fd7
Show file tree
Hide file tree
Showing 2 changed files with 4,498 additions and 2,864 deletions.
15 changes: 14 additions & 1 deletion examples/hello_username.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
PROMPT: VAR 'What is your name?'
GREETING: VAR 'Hello, '
SUFFIX: VAR '!'
VAR 0
BUFFER_START: VAR 500
I: VAR 0
START: LD (BUFFER_START)
START: LD PROMPT
ST I
PRINT_PROMPT: LD [I]
CMP 0
JZ PREPARE_INPUT
ST 2047
LD (I)
ADD 1
ST I
JMP PRINT_PROMPT
PREPARE_INPUT: LD (BUFFER_START)
ST I
LD 10
ST 2047
CYCLE: LD (2046)
ST (I)
CMP 0
Expand Down
Loading

0 comments on commit bd69fd7

Please sign in to comment.