Just, scribbling
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.
poke 214, row
poke 211, column:sys (58732)
You can find that in many different sources. However, it does not display the cursor. Poking at the right spot (204, 0 for enable, 1 for disable) does turn the cursor on and off, but for some reason, the cursor location is wrong.get a$:if a$="" then goto
a900a2009d00109dff109dff119dff12e8e0ffd0ef60To break it down:
a900 lda 0 a200 ldx 0 9d0010 sta 4096,x 9dff10 sta 4351,x 9dff11 sta 4606,x 9dff12 sta 4861,x e8 inx e0ff cpx 255 d0ef bne -16 60 rts
ready. list 10 rem hex8todec 30 i=1:m=0 35 input "mem address start:";s 40 print str$(s);:input a$ 50 gosub 150:i=i+1 60 d=b*16 70 gosub 150 80 b=d+b 90 print b,; 100 poke s+m, b:m=m+1 110 if i=len(a$) then goto 200 120 i=i+1 140 goto 50 150 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 rem end ready.
qWhat is your favourite color
aBlue
aRed
aBlue, i mean red!
c1
10 rem decimal to hex byte converter 20 rem need some data, use basicmem 30 begin=4096 40 finish=4128 50 for i=begin to finish 60 v=peek(i) 65 rem numbers start at 48=0 70 hi=int(v/16):lo=v and 15 75 rem numbers start at 48=0 80 lo$=chr$(48+lo) 90 hi$=chr$(48+hi) 100 rem chars start at 65=a 110 if lo>9 then lo$=chr$(55+lo) 120 if hi>9 then hi$=chr$(55+hi) 130 print hi$lo$+" "; 140 cols=cols+1 150 if cols=8 then gosub 200 160 next 170 goto 230 200 print ";" 210 cols=0 220 return 230 rem end
div.commodore {
border: 60px solid #0088ff;
color: #0088ff;
background-color: #0000aa;
text-transform: uppercase;
font-family: "Courier", "Courier New";
}