Coding Query
Posted: Thu Feb 13, 2014 10:43 am
The following:
is in a program I am looking at at the moment to try and get my rusty skills going again.
I have already found numerous errors and corrected them which is very pleasing, and the program seems to run OK without this bit included.
The variable anf is a respr value,
The code was found outside of any def procs on its own in the middle of the listing and I think the originator was testing the possible reversal of a graphic in a graphical program, at least that's what it appears to me.
However aesthetically the line
should be written
then I got to thinking, this code is 'called' from the start
so unless that anf+4 bypasses significant machine code, the routine would just mash it up and make it unusable, perhaps he/she was testing out a form of protection??? I don't know as my m/c assembler, C etc. skills are non existent.
Any comments?
btw I think have found an interesting feature / bug in SMSQe on QemuLator in MODE 8 that I wasn't aware of, after some more testing I will post.
Code: Select all
2650 FOR n= 0 TO 1200 STEP 2
2660 byte=PEEK(n+anf)
2670 IF byte >63 THEN byte=byte-64
2680 IF byte >15 THEN byte=byte-16
2690 IF byte >3 THEN byte=byte-4
2700 IF byte >0 THEN byte=byte-1
2710 POKE n+anf,byte
2720 NEXT n
I have already found numerous errors and corrected them which is very pleasing, and the program seems to run OK without this bit included.
The variable anf is a respr value,
The code was found outside of any def procs on its own in the middle of the listing and I think the originator was testing the possible reversal of a graphic in a graphical program, at least that's what it appears to me.
However aesthetically the line
Code: Select all
2710 POKE n+anf,byte
Code: Select all
2710 POKE anf+n,byte
Code: Select all
100 anf=RESPR(7200)
110 LBYTES flp1_sprsys_bin,anf:CALL anf:anf=anf+4
Any comments?
btw I think have found an interesting feature / bug in SMSQe on QemuLator in MODE 8 that I wasn't aware of, after some more testing I will post.