bugZ80 assembler - Bugs: bug #50922, jump relative

 
 

bug #50922: jump relative

Submitted by:  sherman owen <shermanowen>
Submitted on:  Wed 03 May 2017 03:28:59 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 May 2017 03:28:59 AM UTC, original submission:

If you try to copile a jr nz instruction and supply a number rather than a label, it compiles using an absolute address.

for instance,

ld de,cnt
ld (hl),val
loop: inc hl
dec de
ld a,d
or e
jr nz, loop

compile correctly but

ld de,cnt
ld (hl),val
inc hl
dec de
ld a,d
or e
jr nz, -8

compiles thinking the address to jump to is -215

here is a listing

00c4 11 0c 00 ld de,12
00c7 36 00 ld (hl),0
00c9 23 inc hl
00ca 1b dec de
00cb 7a ld a,d
00cc b3 or e
00cd 20bytes:7: error: relative jump out of range (-215)
29 jr nz, -8

sherman owen <shermanowen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shermanowen (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1