flat assembler
Message board for the users of flat assembler.

Index > Windows > Coming in from the cold...

Author
Thread Post new topic Reply to topic
sittingduck



Joined: 31 Dec 2007
Posts: 7
sittingduck
Yes, have done alot of asm coding in 68000 series.
But new to I386.
Q1: What Instruction set should i use?
Have an Opteron, Xeon, & pentium4, same to all?

Q2: in some Instruction sets several instructions are missing
like 'stosb' for example why?

Q3: Tried some of the simple examples on this forum, like
turn on gfx & plot a dot, but screen turns black no dot
and never come back... Missing anything?
Code:
org 256

        mov ax,$13
        int $10

plot:
        mov al,255
        mov bx,160
        mov cx,100      
        push $a000
        pop es
        push ax
        mov ax,320
        mul cx
        add ax,bx
        mov di,ax
        pop ax
        stosb

        mov ax,$03
        int $10
        int 20h           
    

Q4: Please help NOW Smile i really wanna go from 68000 series...

Edit by moderator: Please use code tags next time
Post 31 Dec 2007, 12:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
A1: The basline instructions are all the same. But MMX, SSE*, 3DNOW support differs between CPU's.

A2: stosb is a baseline instruction. All CPU's can do it.

A3: Try this before you change back to mode 3
Code:
mov ah,0 ;wait for a key before exiting
int 16h    


A4: Check the AMD and Intel websites for the specs.
Post 31 Dec 2007, 12:52
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Post 31 Dec 2007, 13:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
sittingduck



Joined: 31 Dec 2007
Posts: 7
sittingduck
Thank you very much, just what i need
Post 31 Dec 2007, 23:50
View user's profile Send private message Reply with quote
sittingduck



Joined: 31 Dec 2007
Posts: 7
sittingduck
and btw...
this does no work why?




org 256

mov ax,$13
int $10

plot:
mov al,255
mov bx,160
mov cx,100
push $a000
pop es
push ax
mov ax,320
mul cx
add ax,bx
mov di,ax
pop ax
stosb


mov ah,0 ;wait for a key before exiting
int 16h

mov ax,$03
int $10

int 20h
Post 31 Dec 2007, 23:54
View user's profile Send private message Reply with quote
sittingduck



Joined: 31 Dec 2007
Posts: 7
sittingduck
revolution wrote:
A1: The basline instructions are all the same. But MMX, SSE*, 3DNOW support differs between CPU's.


What are the baseline instructions?

If i want my code to work on all PCs should i avoid
MMX,SSE and 3DNOW?
Post 01 Jan 2008, 00:47
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
What are the baseline instructions?

those which are present on every processor since 386 Smile

Quote:
If i want my code to work on all PCs should i avoid
MMX,SSE and 3DNOW?

practically all new processor has MMX present (it's there since around Pentium Pro I think). But generaly yes, if you use only "baseline instructions", you won't have problems
Post 01 Jan 2008, 10:50
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
sittingduck wrote:
and btw...
this does no work why?
I haven't used the old 256 colour mode for a long time. But, from memory, it uses a palette to map the 8 bit pixel to the screen colour. Perhaps you could try mov al,15. IIRC 15 will be bright white.
Post 01 Jan 2008, 10:58
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2020, Tomasz Grysztar.

Powered by rwasa.