10 December 2018, 18:37 | #941 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
|
|
10 December 2018, 18:53 | #942 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
Last edited by ross; 10 December 2018 at 19:04. Reason: small removal ;) |
|
11 December 2018, 15:46 | #943 | ||
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
Sure one could applaud their determination of keeping backwards compatibility with crazy design decisions for the 80286, but couldn't they have added this extension with the 80386 instead of waiting 34 years(!) to patch a known problem?!? It's just another of those things with x86 that doesn't make sense. Quote:
|
||
11 December 2018, 17:15 | #944 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Right, Meltdown seems to affect only Intel processors and *fully* (HW support) virtualized machines are not affected.
More problematic are Spectre vulnerabilities (bounds check bypass and branch target injection) that can cross between VMs.. |
11 December 2018, 18:23 | #945 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Ok, how about this: https://projecteuler.net/problem=25
And here is my implementation (noob on asm) Code:
;; vasmm68k_mot -Fhunkexe -o euler25 euler25.asm DIGITS = 1000 NUMSTORAGE = DIGITS/2 opt x+ lea.l -NUMSTORAGE(sp),sp move.l sp,a1 lea.l -NUMSTORAGE(sp),sp move.l sp,a2 lea.l -NUMSTORAGE(sp),sp move.l sp,a3 ;; clear the numbers move.l a3,a0 moveq #0,d0 move.w #(3*NUMSTORAGE)/4-1,d1 .clrloop move.l d0,(a0)+ dbra d1,.clrloop ;; init *a1 and *a2 to 1 moveq #1,d0 move.b d0,NUMSTORAGE-1(a1) move.b d0,NUMSTORAGE-1(a2) moveq #2,d0 ; d0 will hold the term-number we are now calculating moveq #1-1,d7 ;number of pair of digits, normalised for dbra ;; n1 -> ;; n2 -> ;; n3 -> ;; n1 -> ;; n2 -> ;; n3 -> ;; addfib n1,n2,n3 n3 = n1 + n2 addfib: MACRO addq #1,d0 ;increase the term-number ;; move num2 to num3 moveq #NUMSTORAGE/4-1,d1 move.l \2,a4 move.l \3,a5 mvloop\@ move.l (a4)+,(a5)+ dbra d1,mvloop\@ lea.l NUMSTORAGE(\1),a4 lea.l NUMSTORAGE(\3),a5 move.w d7,d1 addloop\@ abcd -(a4),-(a5) dbra d1,addloop\@ bcc.s nocarry\@ move.b #1,-(a5) addq #1,d7 nocarry\@ cmp.b #9,(\3) bgt.s done ENDM loop: addfib a1,a2,a3 addfib a2,a3,a1 addfib a3,a1,a2 bra loop done: lea.l 3*NUMSTORAGE(sp),sp rts After you run it, type set in shell and see the answer in RC. |
11 December 2018, 21:58 | #946 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
I've just finished a 44 bytes version (no bss space, only code and stack usage).
I publish it or wait a bit for someone different result? (I love this little competitions ) |
11 December 2018, 22:46 | #947 | |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Quote:
Man, I knew I was noob. I didn't knew I was that much of a noob though Well played, sir! |
|
11 December 2018, 22:53 | #948 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
11 December 2018, 22:58 | #949 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
|
11 December 2018, 23:26 | #950 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
|
11 December 2018, 23:35 | #951 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
12 December 2018, 00:16 | #952 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
code 94, final exe 132
Code:
;; vasmm68k_mot -Fhunkexe -o euler25 euler25.asm DIGITS = 1000 NUMSTORAGE = DIGITS/2 opt x+ lea.l -NUMSTORAGE(sp),sp move.l sp,a1 lea.l -NUMSTORAGE(sp),sp move.l sp,a2 lea.l -NUMSTORAGE(sp),sp move.l sp,a3 ;; init *a1 and *a2 to 1 moveq #1,d0 move.b d0,NUMSTORAGE-1(a1) move.b d0,NUMSTORAGE-1(a2) move.b d0,(a2) moveq #2,d0 ; d0 will hold the term-number we are now calculating moveq #1-1,d7 ;number of pair of digits, normalised for dbra loop: addq #1,d0 lea.l NUMSTORAGE(a2),a6 lea.l NUMSTORAGE(a1),a4 lea.l NUMSTORAGE(a3),a5 move.w d7,d1 digloop: move.b -(a6),-1(a5) abcd -(a4),-(a5) scc d2 move.b (a6),(a4) move.b (a5),(a6) dbra d1,digloop tst.b d2 bne.s nocarry move.b #1,-(a6) move.b #0,-(a4) addq #1,d7 nocarry: cmp.b #9,(a2) bgt.s done bra.s loop done: lea.l 3*NUMSTORAGE(sp),sp rts |
12 December 2018, 00:37 | #953 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
12 December 2018, 13:02 | #954 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
At 46 right now, gonna keep trying. Out of curiosity, I have 18 instructions.
Awaiting meynaf's 44 ;P... |
12 December 2018, 13:12 | #955 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
Quote:
The 44 bytes code is 16 instructions. My 46 bytes version is 18 instructions, like yours. But probably there are more possibilities to do it in 46 bytes. And yes as usual when meynaf will see my code i'm expecting a 2 bytes strip |
|
12 December 2018, 13:21 | #956 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
12 December 2018, 13:51 | #957 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
Yeah, I'm using link.
|
12 December 2018, 14:14 | #958 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
12 December 2018, 15:29 | #959 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
|
|
12 December 2018, 15:47 | #960 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any software to see technical OS details? | necronom | support.Other | 3 | 02 April 2016 12:05 |
2-star rarity details? | stet | HOL suggestions and feedback | 0 | 14 December 2015 05:24 |
EAB's FTP details... | Basquemactee1 | project.Amiga File Server | 2 | 30 October 2013 22:54 |
req details for sdl | turrican3 | request.Other | 0 | 20 April 2008 22:06 |
Forum Details | BippyM | request.Other | 0 | 15 May 2006 00:56 |
|
|