[ql-users] Assembly question

2003-01-17 Thread Jerome Grimbert
Hello everybody, My assembly being a little rusted, I would like to check with the knowledgeable people the following portion of code. ... tst.l d2 beq.s first_place second_place: ... Now, if d2 is 0, would executing that code reach

Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
> Hello everybody, > > My assembly being a little rusted, I would like to check with the knowledgeable > people the following portion of code. > > > ... > tst.l d2 > beq.s first_place > second_place: > ... > > Now, if d2 is 0, would execu

Re: [ql-users] QMON2

2003-01-17 Thread TonyTebby
> Norman Dunbar wrote: > > I'm replying to myself - how sad :o) > Dilwyn Jones replied > A colleague was having a bad morning today. We knew he was having a > bad morning, he'd gone beyond talking to himself, he was answering his > own questions then when someone commented he claimed "that was th

RE: [ql-users] QMON2

2003-01-17 Thread Claude Mourier 00
Oh no : your French is very good ! -Message d'origine- De : TonyTebby [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 17 janvier 2003 10:20 À : [EMAIL PROTECTED] Objet : Re: [ql-users] QMON2 (...) I used to solve a lot of problems this way but, since I moved to France I have started talking

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Morning Jerome, if D2.L is zero then you will branch to the firts_palce, if not, you'll drop into second_place. (Assuming you actually have a first_place in the code somewhere - otherwise, you'll get an assembly error :o) Cheers, Norman. PS. Can I recommend an excellent series of 'Learn Assembl

RE: [ql-users] QMON2

2003-01-17 Thread Norman Dunbar
You should have heard me last night, I was flat out on the living room floor with a listing of the 'reg_list' subroutine from QLTDis and a trace listing of said routine where I had a register dump at the end of every step. Suffice to say the 'conversation' was 'interesting' - talking to yourself

Re: [ql-users] Assembly question

2003-01-17 Thread Jerome Grimbert
Joachim Van der Auwera makes some magical things to make me read } > } > ... } > tst.l d2 } > beq.s first_place } > second_place: } > ... } > } > Now, if d2 is 0, would executing that code reach first_place or } second_place ? } > (I have

Re: [ql-users] Assembly question

2003-01-17 Thread Wolfgang Lenerz
On 17 Jan 2003, at 9:26, Jerome Grimbert wrote: > ... > tst.l d2 > beq.s first_place > second_place: > ... > > Now, if d2 is 0, would executing that code reach first_place or > second_place ? (I have my idea, but I do not want to influe

Re: [ql-users] QMON2

2003-01-17 Thread Wolfgang Lenerz
On 17 Jan 2003, at 10:20, TonyTebby wrote: > I used to solve a lot of problems this way but, since I moved to > France I have started talking to myself in French. The trouble is, my > French is so bad I cannot understand myself. > Nor can anyone else... Wolfgang

Re: [ql-users] QMON2

2003-01-17 Thread Joachim Van der Auwera
Tony Tebby wrote: > I used to solve a lot of problems this way but, since I moved to France I > have started talking to myself in French. The trouble is, my French is so > bad I cannot understand myself. Well, it only gets weird if you start asking others to translate from French into English...

Re: [ql-users] QMON2

2003-01-17 Thread Tony Firshman
On Fri, 17 Jan 2003 at 10:20:20, TonyTebby wrote: (ref: <003001c2be09$cc9512a0$34b2933e@tony>) > > >> Norman Dunbar wrote: >> > I'm replying to myself - how sad :o) >> Dilwyn Jones replied >> A colleague was having a bad morning today. We knew he was having a >> bad morning, he'd gone beyond tal

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Jerome, Interesting question - and code ! harpo equ $160 chico equ $140 elem_size equ $0c clr.l a1A1 = 0 moveq.l #4,d2 lea harpo(a1),a1A1 = A1 + $160 = $160 myloop: adda.w elem_size,a1 A1 = A1 + (5 * $0c) = $19c

Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
> Also, if you do not mind, another (tricker ?) question: > > harpo equ $160 > chico equ $140 > elem_size equ $0c > > clr.l a1 ; (just to fixe a1 to 0 for the question, If I remember correctly, you can't do this. You either use "movel.l #0,a1" (which takes 6 bytes) or better (only 2 b

Re: [ql-users] Assembly question

2003-01-17 Thread Marcel Kilgus
Jerome Grimbert wrote: > Also, if you do not mind, another (tricker ?) question: > > harpo equ $160 > chico equ $140 > elem_size equ $0c > > clr.l a1 ; (just to fixe a1 to 0 for the question, > ; irrelevant "how to" if illegal) > ; but once a1

Re: [ql-users] Assembly question

2003-01-17 Thread Marcel Kilgus
Norman Dunbar wrote: > lea chico-4*elem_size(a1),a1A1 = $140 - $19c + (4 * $0c) > = $140 - $1cc Huh, interesting interpretation of LEA, but I'm afraid your 68k might disagree ;-) The address register is the base (i.e. always added), "chico-4*elem_size" is the offset. And of c

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Curses, I have been found out ! I agree that an assembler *should* evaluate expressions properly, but some don't I'm afraid. QMAC seems to do it, but GWASL (ie the light version) can't assemble the original code for the lea instruction. I can't remember if the original GST non-macro assembler did

Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
- Original Message - From: "Norman Dunbar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 11:30 AM Subject: RE: [ql-users] Assembly question Norman, could it be you have some problems with signs??? > Interesting question - and code ! > > harpo equ $160 > chico

Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
- Original Message - From: "Marcel Kilgus" <[EMAIL PROTECTED]> To: "ql-users" <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 12:04 PM Subject: Re: [ql-users] Assembly question Marcel seems to have less problems with sign, though typing is not his biggest forte. > > adda.w el

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Hi Joachim, no I don't have problems with signs, except when trying to determin which Bcc instructions to use after some singed comparisons :o) I do, as Marcel kindly pointed out, have problems understanding how the LEA instruction actually works ! Cheers, Norman. -

OT: Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
What, using a computer to solve the puzzle... You cheater :-) Joachim P.S. hey, at least I gave the right answer (and fastest too - must be working really hard at the moment), even if I didn't do the actual hex calculations. Not that I want to brag about it. - Original Message - From: "

Re: [ql-users] Assembly question

2003-01-17 Thread Marcel Kilgus
Marcel Kilgus wrote: > Disregarding the bug it's $160 + 5 * $0c + $140 - 4 * $0c > = $160 + $120 + $0c = $28c. Speaking to myself (...), there's of course a typo. It's $160 + $140 + $0c = $2ac Marcel

Re: [ql-users] Assembly question

2003-01-17 Thread Joachim Van der Auwera
> I do, as Marcel kindly pointed out, have problems understanding how the LEA > instruction actually works ! It becomes much easier if you have ever had a look at the opcodes. You then know there is only an offset and nothing to indicate the sign of the data in the register. Joachim

Re: [ql-users] Assembly question

2003-01-17 Thread Jerome Grimbert
Joachim Van der Auwera makes some magical things to make me read } > Also, if you do not mind, another (tricker ?) question: } > } > harpo equ $160 } > chico equ $140 } > elem_size equ $0c } > } > clr.l a1 ; (just to fixe a1 to 0 for the question, } } If I remember correctly, you can'

Re: [ql-users] Assembly question

2003-01-17 Thread Jerome Grimbert
Marcel Kilgus makes some magical things to make me read } Jerome Grimbert wrote: } > Also, if you do not mind, another (tricker ?) question: } > } > harpo equ $160 } > chico equ $140 } > elem_size equ $0c } > } > clr.l a1 ; (just to fixe a1 to 0 for the question, } >

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Hi Jerome, The dbra, stops when the counter is at -1. So your example executes the loop 5 times with d2 set to 4 then 3 then 2 then 1 then 0 and finally stops. Cheers, Norman - Norman Dunbar Database/Unix administrator Lynx Financial Systems Ltd. mailto:[EMA

Re: [ql-users] Assembly question

2003-01-17 Thread Wolfgang Lenerz
On 17 Jan 2003, at 11:04, Jerome Grimbert wrote: > > harpo equ $160 > chico equ $140 > elem_size equ $0c > > clr.l a1 ; (just to fixe a1 to 0 for the question, > ; irrelevant "how to" if illegal) > ; but once a1 has been modified, we cannot

Re: [ql-users] Assembly question

2003-01-17 Thread Wolfgang Lenerz
On 17 Jan 2003, at 12:30, Joachim Van der Auwera wrote: > Wow, very strong. This is the kind of features that make writing (and > debugging) assembler "interesting". > Yeah, right, next you're gonna suggest we switch to 'C'. :-))) Wolfgang

RE: Re: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
Hi Joachim, now then, what's wrong with using a tool to get a job done then ? After all, computers are *supposed* to make life easier for us arn't they ? Mind you, in Dilwyn's case Cheers, Norman. - Norman Dunbar Database/Unix administrator Lynx Fina

Re: [ql-users] Assembly question

2003-01-17 Thread Marcel Kilgus
Joachim Van der Auwera wrote: >> This is probably not the code you wanted. It adds the word at memory >> address $00c to a1, i.e. a # is missing. > Wow, very strong. This is the kind of features that make writing (and > debugging) assembler "interesting". Only the first few times, after that

RE: [ql-users] Assembly question

2003-01-17 Thread Norman Dunbar
-Original Message- From: Marcel Kilgus [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 2:30 PM To: ql-users Subject: Re: [ql-users] Assembly question >> Marcel (currently looking at and writing 68k assembler about 5 hours a >> day...) You have my sympathies then ! Regards, No

Re: [ql-users] Assembly question

2003-01-17 Thread Jerome Grimbert
Marcel Kilgus makes some magical things to make me read } } More difficult to spots in complex and/or large codes are often things } like wrong registers. Only 3 days ago I finally fixed a nasty bug that } lived in the PE for about 12 years. It drew weird windows or crashed } the machine when the

Re: [ql-users] QMON2

2003-01-17 Thread James Hunkins
On Friday, January 17, 2003, at 02:00 AM, Wolfgang Lenerz wrote: On 17 Jan 2003, at 10:20, TonyTebby wrote: I used to solve a lot of problems this way but, since I moved to France I have started talking to myself in French. The trouble is, my French is so bad I cannot understand myself. No

Re: [ql-users] Assembly question

2003-01-17 Thread Marcel Kilgus
Jerome Grimbert wrote: > I have just found out that blob and mask when used in an information windows > (How silly, it would be simpler to use a sprite instead!), seems to > have their origin at the screen origin, not the window origin... > (whereas sprite are just ok...) > Is-that the normal beha

Re: [ql-users] Using WMAN and EasyPTR

2003-01-17 Thread Marcel Kilgus
[EMAIL PROTECTED] wrote: >> There will be some more stuff, but that is still on the drawing board. >> Anyway, I will try to answer any questions anyone might have. > Send it over please Marcel... Can do, but mind you this is is still subject to change. > BTW - have you had any more thoughts on a

Re: [ql-users] QMON2

2003-01-17 Thread Bill Waugh
- Original Message - From: "Tony Firshman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 10:19 AM Subject: Re: [ql-users] QMON2 > > On Fri, 17 Jan 2003 at 10:20:20, TonyTebby wrote: > (ref: <003001c2be09$cc9512a0$34b2933e@tony>) > > > > > > >> Norman Dunbar