09 August 2012, 12:43 | #21 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Hey there - gonna get back into coding cracktros and stuff? Would be cool
From your code, you could replace: Code:
jsr _LVOOpenLibrary(a6) tst.l d0 beq.b .no_lib move.l d0,a6 Code:
jsr _LVOOpenLibrary(a6) move.l d0,a6 beq.b .no_lib |
09 August 2012, 12:55 | #22 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
|
09 August 2012, 13:57 | #23 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
LOL. That told me then!
|
09 August 2012, 14:02 | #24 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
It's quite a common mistake actually, yours truly is guilty of having written such code too.
|
09 August 2012, 14:04 | #25 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
|
|
09 August 2012, 23:38 | #26 | ||
AMOS Extensions Developer
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
|
Quote:
Quote:
I may have overlooked this in some of the manuals, but is there a list of which instructions set/clear the flags (other than obvious ones such as mulu/muls (for overflow) and divu/divs (for underflow))? |
||
10 August 2012, 01:58 | #27 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
http://www.freescale.com/files/archi.../M68000PRM.pdf Any OPA instruction (An destination), except CMPA, does not affect the CCR. Additionally, all OPA instructions with a word size immediate sign extend the data to a longword before the operation. Note that TST.W An does only test the lower word of An. Vasm (fixed in latest version) and PhxAss have an optimization bug that does CMPA.W #0,An -> TST.W An for 68020+ (TST An not allowed on 68000). This should be CMPA.W #0,An -> TST.L An. The bug went unreported for many years. |
|
29 September 2012, 21:56 | #28 | |
Registered User
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 226
|
Quote:
Another (nooby) question which might be a bit off-topic here: I know how to check a library version by calling the exec function OpenLib(). But what if I want to check the version of the exec.library itself? Do I have to use OpenLib() here too or are there other ways? (OpenLib wouldn't work on Kickstarts below 1.1 and OldOpenLib doesn't check the version, that's why I'm asking) |
|
29 September 2012, 22:57 | #29 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
The library version is stored in the library base, so in the case of exec it would be SysBase->LibNode.lib_Version, it's an unsigned 16-bit word at offset 20 from the library base.
|
30 September 2012, 01:59 | #30 |
Registered User
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 226
|
Yay - that sounds easy even to me! Thanx for the hint Leffmann. Now I have to finish some code...
|
01 October 2012, 10:54 | #31 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,130
|
Glad I read this thread, I make that mistake :/
Last edited by redblade; 01 October 2012 at 10:55. Reason: type-O |
09 October 2012, 18:12 | #32 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
Someone could explain me the difference between brs and jsr?
Thanks in advance |
09 October 2012, 18:25 | #33 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
bsr and jsr are basically the same commands, jsr just allows a larger branch distance than bsr. If you need to call a routine in a different section you need to use jsr for example. I'd just always use bsr, your assembler will give you an error message if the distance is too large, then you can change the bsr to jsr.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Danish Amiga Assembly Programming Course | Controller | Coders. Tutorials | 62 | 26 December 2021 15:10 |
Beginning Programming | robheaton | Coders. General | 60 | 16 April 2011 11:49 |
New to forum Love AMIGA of old and beginning an emulation state | catwatch3 | New to Emulation or Amiga scene | 15 | 30 December 2010 12:38 |
Amiga Assembly sources - Please help! | W4r3DeV1L | Amiga scene | 21 | 16 July 2008 08:13 |
Beginning Amiga programming in C++ | zardoz | Coders. General | 3 | 17 May 2006 13:14 |
|
|