Archived

This topic is now archived and is closed to further replies.

ASM crap

This topic is 5132 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, first off: does ANYONE here even know ASM??? If so, what the hell is wrong with this code: .MODEL SMALL .DATA MyMessage dw "This is a message!$" .CODE START: JMP BEGIN BEGIN: mov dx,OFFSET MyMessage mov ax,SEG MyMessage mov ds,ax mov ah,9 int 21h MOV ax,4c00h INT 21h END START i''ve been trying to assemble it, but nothing,just a bunch of errors like: ERROR: THIS IS A MESSAGE.ASM: String value too long! LINE: [5] ERROR: THIS IS A MESSAGE.ASM: Expected end of line! LINE: [8] ERROR: THIS IS A MESSAGE.ASM: Expected end of line! LINE: [14] FATAL ERROR: Identifier does not exists "SEG"! can someone PLEASE help me?!?! (yes, this looks noobish, yes, I''m desperate, comeone people, work with me! I WANT TO LEARN ASM, NOT JUST GET STUCK WITH ERRORS!)

Share this post


Link to post
Share on other sites
right, a quick shifty at some old Uni source gave me this


thecode segment para public ''code''
assume cs:thecode, ds:thedata, ss:thestack
start: mov ax,thedata
mov ds,ax ;set data segment
cls: mov ax,0003 ;clear screen
int 10h ;80x25 chars
headin: mov dh,2 ;row
mov dl,27 ;column
mov bh,0 ;page
mov ah,02 ;move
int 10h ;cursor
lea dx,head ;output heading
mov ah,09
int 21h
thecode ends
thedata segment para public ''data''
head db ''Video Recorder Program V2.52b $''
thedata ends
thestack segment para stack ''stack''
db 4096 dup(?)
thestack ends
end start


Now, while all of that might not be needed it does show you how to clear a screen, print some text and how the assember i was using required the setup (was using TASM to compile).
btw, that code works, flawlessly, the whole project was i think the second best mark i got at Uni (clear over a first), 17K of pure handwritten assembler...ah, the good old days

Share this post


Link to post
Share on other sites
Thanks for the input, of course, the dw SHOULD be db, but my assembler still spits the same error for that, and thanks for the code there, i''ll have to take a better look at it later, i am being bitched at to get to supper lol (i''m 15, )

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well, I''m using Blasm (barely known, nothing else worked properly, i couldn''t get Tasm or Masm, and this one has an ide (that wont assemble properly >:E )) so yeah. and thanx for more input, also, if anyone can tell me (I already know exactly how) how you think you can write e=mc^2 (squared, too lazy to find the ascii code) with normal color writing and dark blue ackgound, I''ll uhh..... program something small for you, lol

Share this post


Link to post
Share on other sites
blarg, damn anonymous, that WAS me btw
oh yes, and you have to use the dos DEBUG (it's the consol window your editing)

[edited by - bobbias on November 26, 2003 9:00:26 PM]

Share this post


Link to post
Share on other sites