FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

DEBUGGING

Use _macsbuglabels


Aah, this is where I come in; the COMPILE statement has an option to leave MacsBugs labels intact; which means if you create a function like so:

COMPILE 0,_macsBugLabels

END GLOBALS

GOTO "Label:END"
LOCAL FN BeepTwice
  BEEP:BEEP
END FN

"Label:END"
IF 0 THEN RETURN

FN BeepTwice
DO
  HANDLEEVENTS
UNTIL FN BUTTON
FLUSHEVENTS
END

A hacker can go in with an assembly level decompiler(ResEdit has add-ins to do this). And it will display something like this(this is always resource 128, btw.):

BeepTwice
+0000 000004 JMP Label.END ; 00000046
+0004 000008 JMP Label.END ; 00000046
+0008 00000C MOVEA.L A7,A2
+000A 00000E MOVE.L A6,-(A7)
+000C 000010 MOVE.L -$08AC(A5),-(A7)
+0010 000014 SUBA.W #$0000,A7
+0014 000018 MOVEA.L A7,A6
+0016 00001A SUBA.L #$00000000,A7
+001C 000020 MOVE.L A7,-$08AC(A5)
+0020 000024 MOVEQ #$03,D0
+0022 000026 MOVE.W D0,-(A7)
+0024 000028 _SysBeep ; A9C8
+0026 00002A MOVEQ #$03,D0
+0028 00002C MOVE.W D0,-(A7)
+002A 00002E _SysBeep ; A9C8
+002C 000030 MOVE.L (A7)+,-$08AC(A5)
+0030 000034 MOVEA.L (A7)+,A6
+0032 000036 RTS
+0034 000038 DC.B $80, $09, 'BeepTwice', $00
+0040 000044 DC.W $0000 ; size of literals

Now what if you called your FN something like "CheckSerialNumber"

I'm no 680x0 assembly buff, but I'm sure after a couple of days I could make this function do absolutely nothing and return back. Including MacsBugs labels is great for debugging; that's why it's there, I suppose...

if you don't include the labels, that's fine too; then all the hacker will see is something like so:

Anon1
+0000 000004 JMP Anon2 ; 00000038
+0004 000008 JMP Anon2 ; 00000038
+0008 00000C MOVEA.L A7,A2
+000A 00000E MOVE.L A6,-(A7)
+000C 000010 MOVE.L -$08AC(A5),-(A7)
+0010 000014 SUBA.W #$0000,A7
+0014 000018 MOVEA.L A7,A6
+0016 00001A SUBA.L #$00000000,A7
+001C 000020 MOVE.L A7,-$08AC(A5)
+0020 000024 MOVEQ #$03,D0
+0022 000026 MOVE.W D0,-(A7)
+0024 000028 _SysBeep ; A9C8
+0026 00002A MOVEQ #$03,D0
+0028 00002C MOVE.W D0,-(A7)
+002A 00002E _SysBeep ; A9C8
+002C 000030 MOVE.L (A7)+,-$08AC(A5)
+0030 000034 MOVEA.L (A7)+,A6
+0032 000036 RTS

Not as easy to figure out, unless you really know what you're looking for.

Terence Jordan