From: Bernhard Urban Date: Sat, 11 Dec 2010 12:32:04 +0000 (+0100) Subject: 3a_asm: divide the computed address with four at br and call X-Git-Tag: bootrom_v1~88 X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=calu.git;a=commitdiff_plain;h=d5b9bd9ddc74422ea9224a1d73ed9111de1f84a6 3a_asm: divide the computed address with four at br and call --- diff --git a/3a_asm/DT.hs b/3a_asm/DT.hs index d4ad490..562285b 100644 --- a/3a_asm/DT.hs +++ b/3a_asm/DT.hs @@ -34,7 +34,7 @@ mnem m = string m iLabel :: Dict -> Parser Word32 -- TODO: save msb (=sign) correctly... -iLabel d@(aktadr,_) = do {i <- (iLit d); return $ (i - aktadr) .&. 0xffff} +iLabel d@(aktadr,_) = do {i <- (iLit d); return $ ((i - aktadr)`div`4) .&. 0xffff} iLit :: Dict -> Parser Word32 iLit (_,d) = do