RedCode: Bomb Detector, Program restorer.

Hello,

This redcode program does seem to work flawlessly:

A bomb is inserted into the program/main on purpose to simulate a bomb.

The restore program restores main from the backup.

Scan finds bombs but doesn't know if bomb is in main or backup... assumes main is hit ;)

line1 jmp runner runner line2 spl main line3 spl scan line4 dat #0

main line5 mov 0,0 line6 dat #0 ; introduce error on purpose line7 mov 0,0 line8 jmp main

backup line9 mov 0,0 line10 mov 0,0 line11 mov 0,0 line12 jmp backup

restore line13 mov line9, line5 line14 mov line10, line6 line15 mov line11, line7 line16 mov line12, line8 line17 spl main ; main has been restored issue a new thread line18 jmp scan

scan line19 cmp line5, line9 line20 jmp restore line21 cmp line6, line10 line22 jmp restore line23 cmp line7, line11 line24 jmp restore line25 cmp line8, line12 line26 jmp restore line27 jmp scan

Bye, Skybuck.

Reply to
Skybuck Flying
Loading thread data ...

This code restores bombs maybe a bit faster:

Instead of completely restoring the program, it only restores the program on a line by line basis ;) And then also calls a new process just in case... however this could create multiples ? oh well ;)

runner spl main spl scanner dat #0

main main_line_1 mov 0,0 main_line_2 dat #0 ; introduce error on purpose main_line_3 mov 0,0 main_line_4 jmp main

backup backup_line_1 mov 0,0 backup_line_2 mov 0,0 backup_line_3 mov 0,0 backup_line_4 jmp backup

restore restore_line_1 mov backup_line_1, main_line_1 spl main jmp scan_line_2

restore_line_2 mov backup_line_2, main_line_2 spl main jmp scan_line_3

restore_line_3 mov backup_line_3, main_line_3 spl main jmp scan_line_4

restore_line_4 mov backup_line_4, main_line_4 spl main jmp scanner

scanner scan_line_1 cmp main_line_1, backup_line_1 jmp restore_line_1 scan_line_2 cmp main_line_2, backup_line_2 jmp restore_line_2 scan_line_3 cmp main_line_3, backup_line_3 jmp restore_line_3 scan_line_4 cmp main_line_4, backup_line_4 jmp restore_line_4 jmp scanner

Bye, Skybuck.

Reply to
Skybuck Flying

Hmm that was kinda interesting.

Error in WinNT.dll lol... doesn't seem like WinCore is too safe ;)

Bye, Skybuck.

Reply to
Skybuck Flying

This redcode stuff is fascinating :)

It works a bit differently than normal asm, very fasinating LOL.

Bye, Skybuck.

Reply to
Skybuck Flying

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.