flat assembler
Message board for the users of flat assembler.

Index > Main > error: value out of range when using 'store'

Author
Thread Post new topic Reply to topic
goldenspider



Joined: 16 May 2011
Posts: 38
goldenspider
makeImg.asm []:
store byte a at FATEntry2+%-1
error: value out of range.

Code:
;-----------------------------------------------------------------------
;BootSector
;-----------------------------------------------------------------------
file 'BOOT.SYS'               ;512Byte

;-----------------------------------------------------------------------
;FAT table 1
;-----------------------------------------------------------------------
FATEntry1:
db 00h,00h,00h,03h,40h,00h,05h,60h,00h,0ffh,0ffh,0ffh

FATEntrySize = $-FATEntry1

db 9*512-FATEntrySize dup(0)

;-----------------------------------------------------------------------
;FAT table 2
;-----------------------------------------------------------------------
FATEntry2:

repeat FATEntrySize
  load a byte from FATEntry1+%-1
  store byte a at  FATEntry2+%-1
end repeat

db 9*512-FATEntrySize dup(0)    
Post 31 Oct 2011, 06:28
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
You have to make space for the data you want to copy.
Code:
;...
FATEntry2: rb FATEntrySize ;without this space we have nowhere to put the data.

repeat FATEntrySize
;...    
Post 31 Oct 2011, 06:41
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
Moving to main. There are no macroinstructions in this code.
Post 31 Oct 2011, 06:53
View user's profile Send private message Visit poster's website Reply with quote
goldenspider



Joined: 16 May 2011
Posts: 38
goldenspider
Thx revolution. That's OK.
Post 31 Oct 2011, 10:32
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. Also on YouTube, Twitter.

Website powered by rwasa.