phasemontony 2024-12-23 17:54
Im making a byte editor and want to make a “delete byte” function but i didnt find any functions and couldnt think of anythting :/
McPepic 2024-12-23 18:22
If you’re talking about the simulated memory space, you could use the COPY command. Just tell it the address immediately after the one you want to erase, the number of bytes you want to “roll back”, followed by the address you want to clear.
Ex.
COPY CLRADR + 1, NUMBYTES TO CLRADR
Sylveon 2024-12-23 18:30
What do you mean by “roll over” :3
phasemontony 2024-12-23 18:43
like lets say this is a byte array
01
02
03
04
lets say you want to delete the byte “02” and then that byte is deleted and all of the other bytes kinda move over
01
03
04
Sylveon 2024-12-23 20:11 (Edited)
Ok here’s how:
TARGET_BYTE=2
DIM ADDRESS(129)
FOR I=0 TO 128
POKE $A000+I,I
ADDRESS(l)=l
NEXT I
SUB DELET_BYT(ID)
POKE $A000+ID,0
ADDRESS(ID)=0
FOR I=ID TO 129
POKE $A000+I,ADDRESS(I+1)
NEXT I
END SUB
CALL DELET_BYTE(TARGET_BYTE)
this might work :3
phasemontony 2024-12-23 20:53
ty
Sylveon 2024-12-23 20:56 (Edited)
:3