Found an old anime magazine, did some really fast referencing from there.
Mmmohdear....
Pointless, but I had fun, for sure!
1 goto10 2 sys57812"alangprogram",8 3 poke193,al-(ha*256):poke194,ha 4 poke174,lo-(hl*256):poke175,hl 5 sys62954 6 print"reset now" 7 poke43,0:poke44,8:poke45,189:poke46,12 10 rem memory monitor and editor 30 i=1:m=0:p=0:s=0 35 print"@<address>,<q>uit":print"return :dump 8" 40 print str$(s);:input a$ 44 if a$="" then goto 400 45 if mid$(a$,i,1)=" " then i=i+1 46 goto 300 50 gosub 150:i=i+1 60 d=b*16 70 gosub 150 80 b=d+b 90 print str$(b)+" "; 95 if p=8 then print "":p=0 96 p=p+1 100 poke s+m, b:m=m+1 110 if i=len(a$) then goto 200 120 i=i+1 140 goto 45 150 rem get octal as decimal 151 b=asc(mid$(a$,i,1)) 160 if b<64 then b=b-48 170 if b>64 then b=b-55 180 return 200 s=s+m: print"" 205 a$="" 210 i=1:m=0:p=1:goto40 220 rem end 300 rem command handlers 310 if a$="q" goto 1000 320 if left$(a$,1)="@" then goto 500 330 if a$="s" then goto 600 390 goto 50 400 rem print 8 byte in hex 401 print chr$(145) + str$(s) +": "; 402 for j=0 to 7: rb=peek(s+j) 410 hi=((240 and rb)/16)+48:lo=(rb and 1 5)+48 420 if hi>57 then hi=hi+7 421 if lo>57 then lo=lo+7 430 print chr$(hi)+chr$(lo)+" "; 440 next j 441 s=s+8:m=0:p=1:i=1:j=0:b=0:d=0 442 print "" 450 goto 40 499 rem memory jump command (@) 500 s=val(mid$(a$,2,len(a$)-1)):i=1:m=0: p=0 505 a$="" 510 goto 40 600 rem save perhaps? 610 input "start memory address:";al 611 input "end memory address:";lo 612 input "filename:";fi$ 620 if fi$="" goto 695 635 ha=int(al/256):hl=int(lo/256) 639 fi$=left$(fi$,12) 640 fori=1tolen(fi$):c=asc(mid$(fi$,i,1) ):poke2048+19+i,c:nexti 690 goto 2 695 i=1:m=0:a$="":goto 40 1000 rem end
I typed in a listing, successfully, and I sorta understood what was going on.
Here's a link to the magazine it's from: https://archive.org/details/C-Lehti-1987-1/mode/2up
Again, trauma therapy. Never successfully wrote a working program from a listing as a child; Certainly not one with a bunch of machine language hex dump in it.