Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
8
Task/Copy-a-string/OPL/copy-a-string.opl
Normal file
8
Task/Copy-a-string/OPL/copy-a-string.opl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
PROC main:
|
||||
LOCAL src$(6),dst$(5)
|
||||
src$="Hello"
|
||||
dst$=src$
|
||||
src$="world!"
|
||||
PRINT dst$,src$
|
||||
GET
|
||||
ENDP
|
||||
25
Task/Copy-a-string/Uxntal/copy-a-string.uxnatl
Normal file
25
Task/Copy-a-string/Uxntal/copy-a-string.uxnatl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
%\n { 0a } %\0 { 00 }
|
||||
|
||||
|18 @Console/write
|
||||
|
||||
|100
|
||||
|
||||
;str2 ;str1 copy-str
|
||||
;str2 print-str
|
||||
|
||||
BRK
|
||||
|
||||
@copy/str ( dest* src* -: )
|
||||
STH2
|
||||
&loop
|
||||
LDAkr STH2k STAr INC2 LDAkr STHr INC2r ?/loop
|
||||
POP2 POP2r
|
||||
JMP2r
|
||||
|
||||
@print/str_ ( str* -: )
|
||||
LDAk .Console/write DEO
|
||||
INC2 @print/str LDAk ?/str_
|
||||
POP2 JMP2r
|
||||
|
||||
@str1 "Uxntal \n \0
|
||||
@str2
|
||||
Loading…
Add table
Add a link
Reference in a new issue