remove the unnecessary bits
This commit is contained in:
parent
2c259cd933
commit
7e8516a143
39
06/main.s
39
06/main.s
@ -1,22 +1,9 @@
|
|||||||
%define BUFF_LIM 32768
|
|
||||||
|
|
||||||
global _start
|
global _start
|
||||||
[bits 64]
|
[bits 64]
|
||||||
[section .text]
|
[section .text]
|
||||||
|
|
||||||
;%include "utils.s"
|
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
|
|
||||||
xor rcx, rcx ; race
|
|
||||||
; check race
|
|
||||||
check_race:
|
|
||||||
push rcx
|
|
||||||
mov rsi, 53837288
|
mov rsi, 53837288
|
||||||
mov rdi, 0x12F02ACD6888C
|
mov rdi, 0x12F02ACD6888C
|
||||||
;mov rsi, 71530
|
|
||||||
;mov rdi, 940200
|
|
||||||
;mov rbx, [(dists+4)+rcx*4]
|
|
||||||
xor rbp, rbp ; poss
|
xor rbp, rbp ; poss
|
||||||
|
|
||||||
mov rcx, 1 ; test ms
|
mov rcx, 1 ; test ms
|
||||||
@ -24,8 +11,6 @@ check_strat:
|
|||||||
mov rax, rsi
|
mov rax, rsi
|
||||||
sub rax, rcx ; remaining time
|
sub rax, rcx ; remaining time
|
||||||
mul rcx
|
mul rcx
|
||||||
;cmp rdx, rbx ; high part
|
|
||||||
;jb .cont ; high part is less
|
|
||||||
cmp rax, rdi ; low part
|
cmp rax, rdi ; low part
|
||||||
jbe .cont
|
jbe .cont
|
||||||
inc rbp
|
inc rbp
|
||||||
@ -34,27 +19,5 @@ inc rcx
|
|||||||
cmp rcx, rsi
|
cmp rcx, rsi
|
||||||
jl check_strat
|
jl check_strat
|
||||||
|
|
||||||
mov rax, [final_value]
|
|
||||||
mul rbp
|
|
||||||
mov [final_value], rax
|
|
||||||
|
|
||||||
are_we_done:
|
|
||||||
pop rcx
|
|
||||||
inc rcx
|
|
||||||
cmp rcx, [race_count]
|
|
||||||
jl check_race
|
|
||||||
|
|
||||||
game_over:
|
game_over:
|
||||||
mov rbx, [final_value]
|
jmp $ ; result in rbp go grab a debugger lol
|
||||||
jmp $
|
|
||||||
|
|
||||||
[section .data]
|
|
||||||
final_value: dq 1
|
|
||||||
race_count: dq 1
|
|
||||||
timelist: dd 53837288
|
|
||||||
dists: dq 333163512891532 ; 12F02ACD6888C
|
|
||||||
;timelist: dd 71530
|
|
||||||
;dists: dq 940200
|
|
||||||
|
|
||||||
|
|
||||||
[section .bss]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user