corewars

Assembly safes and keys- why it won't work?

谁说我不能喝 提交于 2021-02-11 08:41:44
问题 So we have like this safes challenge in assembly, you need to create safes and keys that will break them and end the infinite loop. Here's an example for a safe: loopy: mov ax, [1900] cmp ax,1234 jne loopy and a key: loopy2: mov ax, 1234 mov [1900],ax jmp loopy2 So I have a safe and a key, and I don't understand why it doesn't work: here's my safe: org 100h mySafe: mov dx,5 mov ax, [5768h] mov bx,7 mov word [180h],2 mul word [180h] mov [180h],bx push ax dec bx mov cx,dx mov ax,dx loopy1: add

Assembly - safe competition

白昼怎懂夜的黑 提交于 2021-01-07 11:30:30
问题 I participate in the competition named 'Code guru - Extreme' In this competition there is safes and keys in assembly 8086. To a safe and a key there are joint data segment, and you need to make a key that break the safe. Example to safe: L: mov ax, [1234] cmp ax, 5678 jne L Example to key that break the safe L: mov ax, 5678 mov [1234], ax jne L And now I have a safe that I can not break it and al, 0FEh push ax clc mul ax xor ax, dx or al, 1 loc_10A: sub [0A2h], ax pop ax push ax jnz loc_10A

Assembly - safe competition

蓝咒 提交于 2021-01-07 11:29:58
问题 I participate in the competition named 'Code guru - Extreme' In this competition there is safes and keys in assembly 8086. To a safe and a key there are joint data segment, and you need to make a key that break the safe. Example to safe: L: mov ax, [1234] cmp ax, 5678 jne L Example to key that break the safe L: mov ax, 5678 mov [1234], ax jne L And now I have a safe that I can not break it and al, 0FEh push ax clc mul ax xor ax, dx or al, 1 loc_10A: sub [0A2h], ax pop ax push ax jnz loc_10A