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:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9