I have this code that I’m trying to run but it tells me that it’s too big of a jump.
At first it said “Relative jump out of range by 0015h bytes” when the code was this:
restart:
mov ax, 0b800h
mov es, ax
mov bx, offset dir
mov [bx], di
mov di, 3
mov bx, offset st_am
mov [bx], di
push offset preFrame
push offset menu
push offset Instructions
push offset nowPause
call screens
call black
mov di, offset app
push di ;Give to apple apple location
call apple
mov di, offset SPL
push di ;Give to starterSnake initial snake location
call starterSnake
;Give to up/down/left/right SPL, apple & amount
mov di, offset dir
push di
mov di, offset color
push di
mov di, offset st_am
push di
mov di, offset app
push di
mov di, offset SPL
push di
wasd:
mov ah, 1h
int 16h
jnz newDir ;Check if there's something in the buffer, if not continue
call delay
cmp [dir], 'q'
jz exit
cmp [dir], 'a'
jz a
cmp [dir], 's'
jz s
cmp [dir], 'd'
jz d
cmp [dir], 'w'
jz w
cmp [dir], 'r'
jz restart
and when I changed it to:
;Give to up/down/left/right SPL, apple & amount
push offset dir
push offset color
push offset st_am
push offset app
push offset SPL
and removed lines it said “Relative jump out of range by 0033h bytes”
which is a bigger range and it doesn’t make any sense. Can someone help me?