You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

108 lines
2.2 KiB

.include "instr.inc"
.text
.global _start
_start:
push_pc
pop_r3
cp_r3 _start
jp_eq main
ld_r2_r3
add_r2 (str_wrong_address - _start)
jp PrintStr
main:
# Gather the password
ld_r2 str_prompt_password
call PrintStr
ld_r2 mem_password
ld_r3 0x10
call ReadStr
ld_r2 mem_password
call StrTrim
ld_r2 str_validating
call PrintStr
# Fuck you
# Fuck you
# Fuck you
ld_r3 0 # Fuck you
mix # Fuck you
mix1_ld_r1 mem_password # Fuck you
mix1_inc_r1 # Fuck you
mix1_ldr_r0_r1 # Fuck you
mix1_ld_r1 0x5871 # Fuck you
mix1_cp_r0_r1 # Fuck you
mix1_jp_ne mix1_skip_inc # Fuck you
mix1_inc_r3 # Fuck you
mix1_skip_inc: # Fuck you
# Fuck you
mix1_switch2 # Fuck you
mix2_ldr_r0 mem_password + 3 # Fuck you
mix2_xor_r0 0x54c2 # Fuck you
mix2_cp_r0 0x6da4 # Fuck you
mix2_jp_ne mix2_skip_inc # Fuck you
mix2_inc_r3 # Fuck you
mix2_skip_inc: # Fuck you
# Fuck you
mix2_switch3 # Fuck you
mix3_ld_r1 mem_password + 1 # Fuck you
mix3_dec_r1 # Fuck you
mix3_ldrb_r0_r1 # Fuck you
mix3_add_r0_r0 # Fuck you
mix3_add_r0_r0 # Fuck you
mix3_cp_r0 0x011c # Fuck you
mix3_jp_ne mix3_skip_inc # Fuck you
mix3_inc_r3 # Fuck you
mix3_skip_inc: # Fuck you
# Fuck you
mix3_ld_r0 -1 # Fuck you
mix_delay: # Fuck you
mix3_dec_r0 # Fuck you
mix3_cp_r0 0x0201 # Fuck you
mix3_jp_ne mix_delay # Fuck you
mix3_end # Fuck you
# Fuck you
# Fuck you
# Fuck you
ldrb_r0 mem_password + 5
cp_r0 0
jp_ne main_check
inc_r3
main_check:
cp_r3 4
jp_eq main_correct
ld_r2 str_incorrect
call PrintStr
ret
main_correct:
ld_r2 str_correct
call PrintStr
ret
str_prompt_password:
.ascii "MIX/UNMIX opcodes - proof of concept\n"
.ascii "Enter a password: \0"
str_aborted:
.ascii "Aborted.\n\0"
str_incorrect:
.ascii "Nope, it's wrong.\n\0"
str_validating:
.ascii "Validating...\n\0"
str_correct:
.ascii "Yes, it's correct! FOOLS2023_{*insert correct pass here*}\n\0"
str_wrong_address:
.ascii "Please load this program at address $2000.\n\0"
# GqXf9
mem_password:
.ascii "________________________\0"