View Single Post
Old 27 May 2021, 16:14   #7
CFou!
Moderator
 
CFou!'s Avatar
 
Join Date: Sep 2004
Location: France
Age: 51
Posts: 4,277
Quote:
Originally Posted by burma-shave View Post
I'm working my way through the Amiga Hardware Reference Manual). I'm new to programming at this level and am a bit perplexed by the style used to access hardware registers. The examples in the manual load the base address of the hardware registers into an address register and then use offsets to access each of the registers.

From Page 10 (3rd edition):
Code:
XREF      _custom


lea       _custom,a0
move.w    #$7FFF,intena(a0)
https://archive.org/details/commodor...age/8/mode/1up



So I'm guessing it was expected that _custom could vary between machines, but even then, it's not being resolved at runtime so I'm not sure what the above style is giving you.
you can replace by:
move.w #$7fff,$dff09a

to disable all interrupts

ps:
custom= $dff000 (not vary between machines)
intena=$9a
CFou! is offline  
 
Page generated in 0.04317 seconds with 11 queries