![]() |
![]() |
#241 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
Quote:
Check this post: http://eab.abime.net/showpost.php?p=...&postcount=232 You see this (your original code): mulu #7,d6 ;kv = d6 this is D6 longword value, with highword equal $0000 if $10000 buff is max. clr.l D4 move d6,d4 ;i <- kv ; 2 bytes add.l d4,d4 ;i <- i*2 ; 2 bytes Now this. Clear D4 and move D6 word. D4 is doubled later. If here you will be set/trash bit 16 for D4, then you CANT USE divu.w D4,D3 later. Understand? You must change rest of code to support divu.l or divu.l emulation. And this is ORIGINAL limit, YOUR CODE LIMIT. Then dont wrote more nonsenses again then this is my limit. Changing sub.w #14,d6 to sub.w #28,d6 dont change magically limit from 9400 to 9360. Limited is your code. And $10000 buff. With bigger buff other/slowest 68k code must be used. Then for me $10000 buff limit is ok for 68k too, not only for 8 bit CPUs. D4 can not be $10108-1 value, because OUT OF D4 WORD RANGE. Anyway i suspect then you must still learning much more 68k coding. Later you will be see than clr.l D4 was totally useless instruction for your routine. Because your dirty style of coding (missing .w, missing #1, using or d5,d5 etc) is not easy to understand what you want to do. |
|
![]() |
![]() |
#242 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
I checked your latest repo and:
sub.w #28,d6 ;kv, this limits to 9360 digits - #14 did not have this limit Hahaha, you are very funny. BTW. You still dont optimise code speed for full loop. Too big speed progress? |
![]() |
![]() |
#243 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
Especially for you longwords based version, 2 bytes shortest from my previous version.
But of course divu.w d4,d3 limit still occured. Sorry, 4 bytes shortest Code:
.l7 mulu.w #7,d6 ;kv = d6 lsr.l #2,D6 ; /4 move.l d6,d7 lea.l ra(pc),a3 exg a5,a6 jsr Forbid(a6) moveq.l #INTB_VERTB,d0 lea.l VBlankServer(pc),a1 jsr AddIntServer(a6) exg a5,a6 ;move.w #$4000,$dff096 ;DMA off move.l #2000*65537,d0 move.l a3,a0 .fill move.l d0,(a0)+ subq.l #1,D7 bne.b .fill move.l D7,-(SP) ; cv .l0 moveq #0,D5 ;d <- 0 move.l d6,d4 ;i <- kv, i <- i*2 lsl.l #2,D4 ; *4 adda.l d4,a3 subq.l #1,d4 ;b <- 2*i-1 move.w #10000,d1 bra.b .l4 .l2 ....... subq.l #2,d4 ;i <- i - 1 bcc.b .l2 ;the main loop divu.w d1,d5 ;removed with MULU optimization add.w (SP),D5 ; cv move.l D5,(SP) ; cv ext.l D5 ; necessary only for litwr version of PR0000 routine bsr PR0000 subq.l #7,d6 ;kv bne.b .l0 addq.l #4,SP ; restore stack Last edited by Don_Adan; 28 May 2021 at 04:07. |
![]() |
![]() |
#244 | |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Quote:
buffer = (decimals * 14) / 4 = (decimals * 7) / 2 decimals = (buffer / 7) * 2 Right? |
|
![]() |
![]() |
#245 |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
What is the reason for banning litwr?
|
![]() |
![]() |
#246 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
Quote:
decimals = buffer/7 But this 68k routine wrote 4 digits at once. Then for $10000/7=9362. Because wrote 4 digits, then 9360 is max. Perhaps routine which wrote 1 or 2 digits at once will be much fastest (less divu). But i dont read exactly this project rules. |
|
![]() |
![]() |
#247 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,065
|
You mean the official reason? Unofficially, everyone knew it's coming, he was practically begging for it.
![]() And nope, it wasn't me (to report him or complain to admins about him), I simply stopped posting and wasting my time. That being said, I too would like to hear what was the tipping point. |
![]() |
![]() |
#248 | |
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,742
|
Quote:
Anyway, since litwr is now 'on holiday' (for how long?) I would like to see the complete best 'optimized' code collated, so I can assemble and run it on my A1200 to compare to his original version. The goal is to see what progress we have actually made, and was it 'worth it'? |
|
![]() |
![]() |
#249 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
If you want, you can check this version, 2 bytes longer, but full loop is 2 bytes shortest.
Code:
.l7 mulu.w #7,d6 ;kv = d6 lsr.l #2,D6 ; /4 move.l d6,d7 lea.l ra(pc),a3 exg a5,a6 jsr Forbid(a6) moveq.l #INTB_VERTB,d0 lea VBlankServer(pc),a1 jsr AddIntServer(a6) exg a5,a6 ;move.w #$4000,$dff096 ;DMA off move.l #2000*65537,d0 move.l a3,a0 .fill move.l d0,(a0)+ subq.l #1,D7 bne.b .fill move.l D7,-(SP) ; cv lea 10000.W,A2 .l0 moveq #0,D5 ;d <- 0 move.l d6,d4 ;i <- kv, i <- i*2 lsl.l #2,D4 ; *4 adda.l d4,a3 subq.l #1,d4 ;b <- 2*i-1 move.l A2,D1 bra.b .l4 .l2 ....... subq.l #2,d4 ;i <- i - 1 bcc.b .l2 ;the main loop divu.w d1,d5 ;removed with MULU optimization add.w (SP),D5 ; cv move.l D5,(SP) ; cv ext.l D5 ; necessary only for litwr version of PR0000 routine bsr PR0000 subq.l #7,d6 ;kv bne.b .l0 addq.l #4,SP ; restore stack ..... msgx dc.b 32,10 cnop 0,4 ; cv dc.w 0 time dc.l 0 cout dc.l 0 buf ds.b 4 ; align 2 ra |
![]() |
![]() |
#250 | ||||
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Quote:
The bickering about details was mutual among several members in this thread, can't blame litwr alone for that. Quote:
Quote:
Quote:
https://crypto.stanford.edu/pbc/notes/pi/code.html |
||||
![]() |
![]() |
#251 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,047
|
Init code optimised a few.
Code:
start lea libname(pc),a1 ;open the dos library move.l 4.W,a5 move.l a5,a6 jsr OldOpenLibrary(a6) move.l d0,a6 jsr Output(a6) ;get stdout lea cout(PC),A4 move.l d0,(A4) ;cout move.l d0,d1 ;call Write(stdout,buff,size) ; move.l #msg1,d2 moveq #msg1-cout,D2 ; must be checked if in moveq range, the longest text can be moved at end add.l A4,D2 moveq #msg4-msg1,d3 jsr Write(a6) ; move.l #start+$10000-ra,d7 ; divu #7,d7 move.l #$10000-(ra-start),D7 divu.w #7*4,D7 ext.l d7 ; necessary only for Litwr version of PR0000 ; and.b #$fc,d7 ;d7=maxn lsl.l #2,D7 .l20 ; move.l cout(pc),d1 move.l (A4),D1 ; cout ; move.l #msg4,d2 moveq #msg4-cout,D2 add.l A4,D2 moveq #msg5-msg4,d3 jsr Write(a6) move.l d7,d5 bsr.w PR0000 ; move.l cout(pc),d1 move.l (A4),D1 ; cout ; move.l #msg5,d2 moveq #msg5-cout,D2 add.l A4,D2 moveq #msg3-msg5,d3 jsr Write(a6) bsr.w getnum cmp.w d7,d5 bhi.b .l20 move.w d5,d1 beq.b .l20 addq.w #3,d5 and.w #$fffc,d5 cmp.b #10,(a0) bne.b .l21 move.w d5,d6 cmp.w d1,d5 beq.b .l7 .l21 bsr.w PR0000 ; move.l cout(pc),d1 move.l (A4),D1 ; cout ; move.l #msg3,d2 moveq #msg3-cout,D2 add.l A4,D2 moveq #msg2-msg3+1,d3 jsr Write(a6) .l7 mulu.w #7,d6 ;kv = d6 lsr.l #2,D6 ; /4 move.l d6,d7 lea ra(pc),a3 exg a5,a6 jsr Forbid(a6) moveq.l #INTB_VERTB,d0 lea VBlankServer(pc),a1 jsr AddIntServer(a6) exg a5,a6 ;move.w #$4000,$dff096 ;DMA off move.l #2000*65537,d0 move.l a3,a0 .fill move.l d0,(a0)+ subq.l #1,D7 bne.b .fill move.l D7,-(SP) ; cv lea 10000.W,A2 .l0 moveq #0,D5 ;d <- 0 move.l d6,d4 ;i <- kv, i <- i*2 lsl.l #2,D4 ; *4 adda.l d4,a3 subq.l #1,d4 ;b <- 2*i-1 move.l A2,D1 bra.b .l4 .l2 ....... subq.l #2,d4 ;i <- i - 1 bcc.b .l2 ;the main loop divu.w d1,d5 ;removed with MULU optimization add.w (SP),D5 ; cv move.l D5,(SP) ; cv ext.l D5 ; necessary only for litwr version of PR0000 routine bsr PR0000 subq.l #7,d6 ;kv bne.b .l0 addq.l #4,SP ; restore stack ..... msgx dc.b 32,10 cnop 0,4 ; cv dc.w 0 time dc.l 0 cout dc.l 0 buf ds.b 4 ; align 2 ra lea.l buf(pc),a0 move.l a0,d2 can be moved/added before of full loop, because D2 is unchanged in the full loop. For my version too, but because i dont know which version is really fastest, i dont change this for now. Anyway 2 commands left, in the future. |
![]() |
![]() |
#252 |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Who banned litwr and what was the reason?
|
![]() |
![]() |
#253 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
I banned him after an agreement between mods and gmods. Why is for litwr to tell you on his return. I would like to point out that we do not have to publicly explain why we have banned a user. The user will always be told the reason they have been banned and in most cases will have had prior warnings too. Ask litwr when he is back! |
![]() |
![]() |
#254 | |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
litwr was banned for 2 weeks.
Quote:
![]() |
|
![]() |
![]() |
#255 | |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Quote:
Why? Are you afraid to take responsibility for it? |
|
![]() |
![]() |
#256 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Probably to avoid useless public arguments. There's always people who think users that are banned shouldn't have been and vice versa there's always people who think certain people should be banned that are still there.
At the end of the day, that's what the mods are for - to make that choice based on the rules. Discussing and questioning these kind of decisions in public, often nigh on endlessly (as we've seen on this board before) never changes anything. It only serves to give the impression the mods are the bad guys (because as we've also seen people almost never change their minds), when in reality it's almost always more complicated than that and the mods are basically just doing their job. One that is often rather thankless it seems. Last edited by roondar; 01 June 2021 at 10:17. |
![]() |
![]() |
#257 | |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Quote:
|
|
![]() |
![]() |
#258 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,437
|
Quote:
In case you don't realise it, your reply essentially backs up my point: it's feels argumentative in nature and seems to me to assume bad faith acting by the moderation team. Now, it's perfectly possible you don't intend this, but that's how it felt to me anyway. And I personally don't feel that's fair. You don't have all the facts, neither have I. |
|
![]() |
![]() |
#259 | |
old bearded fool
Join Date: Jan 2010
Location: Bangkok
Age: 57
Posts: 779
|
Quote:
|
|
![]() |
![]() |
#260 |
Moderator
Join Date: Dec 2010
Location: Wisconsin USA
Age: 60
Posts: 846
|
@Thread
Ok, I think this discussion regarding litwr's ban, which is in fact off-topic here, has gone far enough. Now, I'm going to quote the EAB rules for you before taking any moderator actions you may not like: Consistently derail topics: While not a major issue as topics can veer off topic during the natural course of the discussion, however if you continually steer a discussion away from the subject or towards a topic that you wish to discuss, you will be warned. If you persist, other measures will be taken against you. To avoid this, raise your own thread on the subject rather than hijacking another similar topic. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
68020 Bit Field Instructions | mcgeezer | Coders. Asm / Hardware | 9 | 27 October 2023 23:21 |
68060 64-bit integer math | BSzili | Coders. Asm / Hardware | 7 | 25 January 2021 21:18 |
Discovery: Math | Audio Snow | request.Old Rare Games | 30 | 20 August 2018 12:17 |
Math apps | mtb | support.Apps | 1 | 08 September 2002 18:59 |
|
|