I'm working on a code in x64 that finds the maximum number of a set of data items. I am currently reading Programming from the ground up so I have to convert everything from 32 to 64. I keep getting this error every time I compile the program.
maximum.asm:22: error: comma, colon, decorator or end of line expected after operand
maximum.asm:22: error: comma, colon, decorator or end of line expected after operand
maximum.asm:28: error: comma, colon, decorator or end of line expected after operand
maximum.asm:28: error: comma, colon, decorator or end of line expected after operand
1 section .data
12 ;These are the data items
13
14 data_items:
15 db 3,67,34,222,45,75,54,34,44,33,22,11,66,0
16
17 section .text
18
19 global _start
20 _start:
21 mov $0, rdi
22 mov data_items(,rdi,8), rax
23 mov rax, rbx
24
25 start_loop:
26 je loop_exit
27 inc rdi
28 mov data_items(,rdi,8), rax
29 cmp rbx, eax
30 jle start_loop
31 mov rax, rbx
32 jmp start_loop
33
34 loop_exit:
37 mov $1, rax
38 syscall
39