flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Programmes and Examples for fasm

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
vador they (bootloaders) are just one thing, making it plural or adding too
many many will not work.
Post 25 Jul 2007, 11:20
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Post 25 Jul 2007, 15:21
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
Madis731
Making $$$ money $$$ because the implementation of the algo is HYPER-SUPER-DUPER-FAST Very Happy

okey, depends - some people make serious programs in ASM too, like OctaOS and MenuetOS and DexOS etc. FASM is made in assembly and its
NOT A TOY by any means Smile


Last edited by Madis731 on 01 Aug 2007, 13:09; edited 1 time in total
Post 25 Jul 2007, 15:45
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
fasm is not a toy!
OctaOS and MenuetOS do not compare to Linux.
Post 26 Jul 2007, 05:45
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
0.1 wrote:
fasm is not a toy!
OctaOS and MenuetOS do not compare to Linux.

If you could get the same number of coders, to code for "OctaOS and MenuetOS" has do for linux, than they would more than compare. Also if Co like IBM put the same money in Wink .
Post 26 Jul 2007, 15:42
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
0.1 wrote:
fasm is not a toy!
OctaOS and MenuetOS do not compare to Linux.


Linux is 16 years old. I dunno exactly about OctaOS (three? four?) but Menuet is something like five. They're all free, multitasking OSes with GUIs running (at least) on IA32 cpus able to bootstrap themselves. And FASM runs on all of them. And if we can agree that "FASM is not a toy" (as Madis says), then surely any OS running it is not a toy either.
Post 26 Jul 2007, 22:46
View user's profile Send private message Visit poster's website Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
i think menuet needs a boost, that's all. I don't have the hardware for it, though.
Post 27 Jul 2007, 02:30
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
- 23.01.2007 M32 0.84 released!

How is possible that you don't have the hardware for it?
Post 27 Jul 2007, 02:43
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
I mean 64... 32 is still updated but it's pretty much an ignored project from what i've seen.
Post 27 Jul 2007, 02:46
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
QEMU? Yeah, I know it is not the same but at least you will see it running. I never tried but perhaps with QEMU you will be able to make networking work thanks to NIC emulation which otherwise could be a little hard because there is no much support for a big variety of NICs.
Post 27 Jul 2007, 02:59
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
kohlrak wrote:
I mean 64... 32 is still updated but it's pretty much an ignored project from what i've seen.

Theres loads of work being done on KolibriOS a menuet fork.
http://www.kolibri.hut1.ru/index_e.htm
http://meos32.7.forumer.com/index.php?sid=628a8d6fc3fde7e0d655cbbec1cac411
Post 27 Jul 2007, 05:33
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Okay they (*OS) aren't toys either!
But we are children!
Post 27 Jul 2007, 06:01
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Check for balanced ()s


Description: bal.asm
Download
Filename: bal.asm
Filesize: 590 Bytes
Downloaded: 314 Time(s)


_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 28 Jul 2007, 06:24
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Check for balanced []s ()s {}s <>s even nested.
In expressions like this: {[ + 7 * (8 + 4)] * <7 + 1>}


Description: bal2.asm
Download
Filename: bal2.asm
Filesize: 1.3 KB
Downloaded: 306 Time(s)


_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 28 Jul 2007, 09:34
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak


I know, i tried it out. If i wasn't having a particular problem with it i'd be able to give it a rating.
Post 28 Jul 2007, 11:05
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Untested
Code:
; Sort the array of integers.
; esi == array pointer
; ecx == array count

sort:
 mov eax, 0
.l1:
      mov ebx, eax
        mov edx, [esi+eax*4]
.l2:
    cmp [esi+ebx*4], edx
        jge .after_swap
     xchg edx, [esi+ebx*4]
.after_swap:
   inc ebx
     cmp ebx, ecx
        jb .l2
      mov [esi+eax*4], edx
        inc eax
     cmp eax, ecx
        jb .l1
      ret
    

_________________
Code:
 o__=-
 )
(\
 /\  
    


Last edited by 0.1 on 02 Aug 2007, 06:32; edited 1 time in total
Post 01 Aug 2007, 12:33
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Code:
; Filter vovels.
; esi == ASCIIZ character string pointer.
filter:
  mov edi, esi
.nxt:       lodsb
       cmp al, 'a'
       je .nxt
     cmp al, 'e'
       je .nxt
     cmp al, 'i'
       je .nxt
     cmp al, 'o'
       je .nxt
     cmp al, 'u'
       je .nxt
     stosb
       cmp al, 0
   jnz .nxt
    ret
    


PS: sorry big blunder earlier!

_________________
Code:
 o__=-
 )
(\
 /\  
    


Last edited by 0.1 on 02 Aug 2007, 11:26; edited 1 time in total
Post 02 Aug 2007, 06:31
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
Madis731
Actually the code you presented is what assembly programmers call:
Code:
nop
    


What should that last piece of code do? Filter them IN or filter them OUT? Definitely needs optimization Razz

Anyways, instead of whining I should code:
Code:
        mov esi,blah
        mov edi,esi
filter:
        lodsb
        imul    ebx,eax,01010101h
        xor     ebx,'aeio'
        mov     edx,ebx
        not     ebx
        sub     edx,01010101h
        and     ebx,80808080h
        and     ebx,edx
        jne     filter
;        cmp     al, 'a'
;        je      filter
;        cmp     al, 'e'
;        je      filter
;        cmp     al, 'i'
;        je      filter
;        cmp     al, 'o'
;        je      filter
        cmp     eax, 'u'   ;For any four characters you can repeat the code sequence above. CMOVxx would help also.
        je      filter
        stosb
        test    eax,eax
        jnz     filter
        mov     byte[edi],0
        ret

  blah       db 'I''m actually pretty smart!',0
    


SSE2 anyone?
Code:
        mov esi,text
        mov edi,esi
filter:
        lodsb
        imul    ebx,eax,01010101h
        movd    xmm0,ebx
        pshufd  xmm0,xmm0,00000000b ;Populate
        pxor    xmm0,[filter_chars] ;The same null-byte detection as above
        movaps  xmm1,xmm0
        psubd   xmm1,[const01]
        pandn   xmm0,[const80]
        pand    xmm0,xmm1
        pmovmskb ebx,xmm0
        test    ebx,ebx
        jne     filter
        stosb
        test    eax,eax
        jnz     filter
        mov     byte[edi],0
        ret
align 16
  const01:      dq 0101010101010101h,0101010101010101h
  const80:      dq 8080808080808080h,8080808080808080h
  filter_chars: db 'AEIOUaeiouuuuuuu',0 ;16-byte align
  ;You can fill these 16 byte until you run out of space. Then you
  ;can make another iteration or use another register.
  text          db 'I''m actually pretty smart!',0
    
Post 02 Aug 2007, 10:30
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Thanks a lot Madis731!
Although I do not understand your examples (DUMB!) but they seem
very good!

And sorry everyone for that silly mistake !

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 02 Aug 2007, 13:22
View user's profile Send private message Reply with quote
0.1



Joined: 24 Jul 2007
Posts: 474
Location: India
0.1
Code:
; Convert from unsigned number in EAX to ASCIIZ string pointed by EDI.
conv:
        mov ecx, 10
        push 0
.l1:    xor edx, edx
        div ecx
        or dl, '0'
        push edx
        test eax, eax
        jnz .l1
.l2:    pop eax
        stosb
        cmp al, 0
        jnz .l2
        ret    

_________________
Code:
 o__=-
 )
(\
 /\  
    
Post 02 Aug 2007, 13:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.