Add ability to set seed manually

This commit is contained in:
Juhani Krekelä 2022-02-25 02:19:12 +02:00
parent 9b2cd70f4d
commit 2ae741d705
2 changed files with 39 additions and 6 deletions

View File

@ -13,11 +13,6 @@ Gameplay
Gameplay is as in hello wordl's default daily mode. `x` under a letter marks it
as incorrect and `^` marks it as being in the wrong place.
Missing features
----------------
- Ability to set the seed manually
Word lists
----------
The words lists are taken from

View File

@ -73,6 +73,44 @@ parse_arguments:
test cx, cx
jz seed_rng_date
seed_rng_argument:
xor ax, ax
xor dx, dx
mov bp, mull32
call store32
.loop:
xor dx, dx
mov ax, 10
mov bp, mulr32
call store32
call mul32
mov bp, addl32
call store32
lodsb
cmp al, '0'
jb print_help
cmp al, '9'
ja print_help
sub al, '0'
xor ah, ah
xor dx, dx
mov bp, addr32
call store32
call add32
mov bp, mull32
call store32
loop .loop
mov bp, rng_seed
call store32
jmp select_target
print_help:
mov ah, 9
mov dx, help_str
@ -1052,7 +1090,7 @@ guesses_str db ' guesses.$'
guess_str db ' guess.$'
help_str:
db 'Usage: dosdl [/h | /u | /l | /?]', 13, 10
db 'Usage: dosdl [/h | /u | /l | /?] [seed]', 13, 10
db '/h Enable hard mode.', 13, 10
db '/u Enable ultra hard mode.', 13, 10
db '/l Display license info.', 13, 10