Add ultra hard mode
This commit is contained in:
parent
a90e026623
commit
a6adf07fc7
|
@ -17,7 +17,6 @@ Missing features
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- Ability to set the seed manually
|
- Ability to set the seed manually
|
||||||
- Hard and extra hard modes
|
|
||||||
|
|
||||||
Word lists
|
Word lists
|
||||||
----------
|
----------
|
||||||
|
|
60
dosdl.asm
60
dosdl.asm
|
@ -306,6 +306,51 @@ check_ultra_hard_mode:
|
||||||
cmp byte [ultra_hard_mode], 1
|
cmp byte [ultra_hard_mode], 1
|
||||||
jne .done
|
jne .done
|
||||||
|
|
||||||
|
; See whether any ruled-out letters were used
|
||||||
|
xor bp, bp
|
||||||
|
mov cx, 5
|
||||||
|
.ruled_out:
|
||||||
|
xor bh, bh
|
||||||
|
mov bl, [guess + bp]
|
||||||
|
mov ax, bx
|
||||||
|
mov al, [alphabet + bx - 'a']
|
||||||
|
cmp al, ' '
|
||||||
|
jne .not_ruled_out
|
||||||
|
|
||||||
|
mov [ruled_out_error_str.letter], bl
|
||||||
|
mov ax, bp
|
||||||
|
add al, '1'
|
||||||
|
mov [ruled_out_error_str.position], al
|
||||||
|
mov si, ruled_out_error_str
|
||||||
|
jmp print_error
|
||||||
|
|
||||||
|
.not_ruled_out:
|
||||||
|
inc bp
|
||||||
|
loop .ruled_out
|
||||||
|
|
||||||
|
; See whether wrongly places letters were moved
|
||||||
|
xor bp, bp
|
||||||
|
mov cx, 5
|
||||||
|
.wrong_places:
|
||||||
|
mov al, [wrong_places + bp]
|
||||||
|
test al, al
|
||||||
|
jz .not_wrong_place
|
||||||
|
|
||||||
|
cmp al, [guess + bp]
|
||||||
|
jne .moved
|
||||||
|
|
||||||
|
mov [not_moved_error_str.letter], al
|
||||||
|
mov ax, bp
|
||||||
|
add ax, '1'
|
||||||
|
mov [not_moved_error_str.position], al
|
||||||
|
mov si, not_moved_error_str
|
||||||
|
jmp print_error
|
||||||
|
|
||||||
|
.moved:
|
||||||
|
.not_wrong_place:
|
||||||
|
inc bp
|
||||||
|
loop .wrong_places
|
||||||
|
|
||||||
.done:
|
.done:
|
||||||
|
|
||||||
check_dictionary:
|
check_dictionary:
|
||||||
|
@ -953,6 +998,7 @@ exact_hit_error_str:
|
||||||
db " must be '"
|
db " must be '"
|
||||||
.letter db '#'
|
.letter db '#'
|
||||||
db "'$"
|
db "'$"
|
||||||
|
|
||||||
wrong_place_error_str:
|
wrong_place_error_str:
|
||||||
db " - letter '"
|
db " - letter '"
|
||||||
.letter db '#'
|
.letter db '#'
|
||||||
|
@ -960,6 +1006,20 @@ wrong_place_error_str:
|
||||||
.position db '#'
|
.position db '#'
|
||||||
db ' must be reused$'
|
db ' must be reused$'
|
||||||
|
|
||||||
|
not_moved_error_str:
|
||||||
|
db " - letter '"
|
||||||
|
.letter db '#'
|
||||||
|
db "' in position "
|
||||||
|
.position db '#'
|
||||||
|
db ' must be moved$'
|
||||||
|
|
||||||
|
ruled_out_error_str:
|
||||||
|
db " - letter '"
|
||||||
|
.letter db '#'
|
||||||
|
db "' in position "
|
||||||
|
.position db '#'
|
||||||
|
db ' has been ruled out$'
|
||||||
|
|
||||||
section .rodata
|
section .rodata
|
||||||
|
|
||||||
greeting_str db 'Welcome to hello DOSdl. Run `dosdl /?` for help.', 13, 10, '$'
|
greeting_str db 'Welcome to hello DOSdl. Run `dosdl /?` for help.', 13, 10, '$'
|
||||||
|
|
Loading…
Reference in New Issue