flat assembler
Message board for the users of flat assembler.

Index > Main > [Solved] Value out of Range (weird)

Author
Thread Post new topic Reply to topic
sid123



Joined: 30 Jul 2013
Posts: 340
Location: Asia, Singapore
sid123
I apologize for showing such ignorance but when I try this in FASM :
Quote:

mov bl, scan_code
;; Code
;; Code
;; And More Code
KERNEL_DATA:
scan_code db 0x00

FASM outputs a "Value out of range exception"
However,
Quote:

mov bx, scan_code
;; Same stuff
scan_code db 0

It works. Shocked
Can anyone explain me what does "Value out of range" mean?
And what should be done to put the value of scan_code into BL?

_________________
"Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X
XD
Post 09 Feb 2014, 12:01
View user's profile Send private message Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 340
Location: Asia, Singapore
sid123
I seriously need coffee.
Code:
;; Works.
mov bl, [scan_code]
    

Sorry for wasting people's time.
COFFFFFFFFEEEEEEEEEEEE!
Post 09 Feb 2014, 12:04
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 18:17; edited 1 time in total
Post 09 Feb 2014, 16:34
View user's profile Send private message Reply with quote
m3ntal



Joined: 08 Dec 2013
Posts: 296
m3ntal
You can't copy address (16BIT?) to 8BIT register, value exceeds size:
Code:
mov bl, scan_code    
PS: Forgot []? Did you intend to read the 8BIT value at [scan_code]?
Post 09 Feb 2014, 22:12
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.