You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(31) |
Nov
(9) |
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2005 |
Jan
(8) |
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
| 2006 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
(8) |
Apr
(7) |
May
(1) |
Jun
(6) |
Jul
(7) |
Aug
(26) |
Sep
(8) |
Oct
(14) |
Nov
(7) |
Dec
(4) |
| 2008 |
Jan
(5) |
Feb
(7) |
Mar
(31) |
Apr
(18) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(3) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(9) |
Jun
(8) |
Jul
(17) |
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(15) |
Nov
|
Dec
(5) |
| 2011 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
(6) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(4) |
Dec
(1) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Frank K. <fbk...@co...> - 2005-01-20 23:44:39
|
Nasm 0.98.39 is available - but not on SourceForge quite yet... they're having some "transitional difficulties" at the moment. We'll get copies up there as soon as the release system seems stable - couple days, probably. Meanwhile: http://www.kernel.org/pub/software/devel/nasm/ The "binaries" are not complete, but win32, djgpp, and Linux are available, plus, of course, a source package. 0.98.39 goes from C89 to C99, which apparently is causing some build problems with some compilers. If you need/want to build Nasm from source, and you can't figure it out, holler for help. If you *can* figure it out, *post* some help, please. For djgpp, you need the "beta 2.04" version, for example (Thanks to Bart Oldeman for that tip). The Makefile created by "configure" in Linux (and rdoff/Makefile) needs "std=c99" removed. (Mkfiles/Makefile.unx seems okay) I hope we'll have a "cleanup release" out sooner than the year and a half that this release took, but no promises. I *really* hope that everyone will upgrade to 0.98.39 as soon as possible! Why? Well... a "Serious Problem" has been uncovered in Nasm - all versions prior to 0.98.39 (maybe not *really* early versions). We all know enough not to run code from untrusted sources (I hope!). Turns out you're vulnerable even *assembling* malicious source with Nasm. Yes, a <line-noise> buffer overflow (potentially exploitable). Betov gets "I told you so" rights. Not actually *caused* by using C, but C provided the hole for us to fall into. I am deeply embarrassed that this remained undiscovered so long! The vulnerability was discovered by Jonathan Rockaway (a student - since Nasm was written by a student, this is perhaps appropriate), reported to us by D.J.Bernstein (his instructor). Fixed by Ed Beroset. Thanks to all involved! Other than that, the changes aren't too exciting. Nice new rdoff stuff from Yuri Zaporogets, for the few who use rdoff. Otherwise minor cleanups not worth mentioning... Please upgrade and get rid of that buffer overflow! If you can't/won't upgrade, please *examine* any source code from less-than-fully-trusted sources for anything that looks "weird". AFAIK, no one is targetting Nasm, but... we don't need this crap! Best, Frank |
|
From: anonymous c. <nas...@ya...> - 2005-01-16 20:18:48
|
> In my project I am dealing with different language string catalogs, and > it would be of use if there would be a directive that checks the > existence of certain file to be included, is there a way to do this? > Something like > %ifexists "filename" > %ifnexists "filename" > ... > %endif I have filed SF RFE #1103473 for this -- "add support for %(EL)IF(N)FILE". __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com |
|
From: Jana Z. <zr...@ya...> - 2005-01-04 19:08:37
|
hi and how are you friends I'm trying to do that task that I want to create a program that should generate a beep when shift key is pressed and stops the beep when the shift key is released. Every line of the program should be properly commented. I want to do this for the seeking of how to hook the speaker's on off function by pressing the key. please help me. --------------------------------- Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now |
|
From: Frank K. <fbk...@co...> - 2005-01-03 14:58:16
|
Hi Aitor, Now it looks like *my* last message didn't go out. That was the easy one: "nasm -v" for version information. Got some feedback from the win32-nasm-users Yahoo group: ----------------------- We have the all mighty make program... It is a must for programmers... http://directory.fsf.org/make.html But it is hard to tell if this is the tool you need, since you haven't said what you want to do with such a feature... ===== rogr|less | /\ ascii ribbon campaign, olestays[at]yahoo[dot]no | \/ against html mail and http://home.no.net/pusleole | /\ proprietary formats ------------------------------------------------------ I don't see how "make" is going to help you... but it's nice to see that win32 users are aware of gnu make :) > I have another one: > > == A > %define gotit > == > > == B > %include "A" > > %ifdef gotit > ... > === > > I was just wondering if there was a clean way to do this, I intend "A" > to be a simple format file with almost only strings to be translated by > other people (and avoid the %define) Mmmm... we can compare text... if you had one of the strings as a macro parameter, you could do: %ifidn %1 gotit ; do something %else ; ... %endif Perhaps you could figure out a way to use that to avoid the "%define"... Not really very "clean". Ordinarily, you'd "know" at assemble time whether you had that file available or not. I assume what you want to do is let your users do some "do-it-yourself internationalization", if they've translated the strings(?). You may have to require the user to plainly tell Nasm "we have the file"... or not. Best, Frank |
|
From: <ait...@wa...> - 2005-01-02 23:50:59
|
(Re-sending, didn't seem to reach) Hi there, I've been using NASM for a while (to compile FreeDOS DISPLAY[.SYS] from the FreeDOS project). I have two questions/suggestions that I'd like to post here first, and I'll do that in two different mails for clarity reasons. My first question is: I have been lurking around with different NASM versions, is it possible to know the version of the NASM executable that I am using? Something like NASM --version or the like. Cheers to all, Aitor |
|
From: Frank K. <fbk...@co...> - 2005-01-02 23:21:37
|
Aitor Santamaría Merino wrote: > Hi, > > In my project I am dealing with different language string catalogs, and > it would be of use if there would be a directive that checks the > existence of certain file to be included, is there a way to do this? > Something like > %ifexists "filename" > %ifnexists "filename" > ... > %endif Hi Aitor, I don't think Nasm provides any way to do that. I wish I had a better answer for ya! The only workaround I can think of would be a batch or script file that collects that information... if exist "file001" do echo %define HAVE_FILE001 >> filelist.inc if exist "file002"... ... pretty ugly. I'll cc this to a couple other lists... maybe somebody will have some better ideas... Best, Frank |
|
From: <ait...@wa...> - 2005-01-02 21:41:14
|
Hi, In my project I am dealing with different language string catalogs, and it would be of use if there would be a directive that checks the existence of certain file to be included, is there a way to do this? Something like %ifexists "filename" %ifnexists "filename" ... %endif Cheers, Aitor |
|
From: Pearlie M. <ihs...@ya...> - 2004-11-28 20:56:46
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#000006" text="#000001"><p><a href="requireyourrx.com"><IMG SRC="cid:part1.05010306.06030408@uoy...@ho..." border="0" ALT=""></a></p><p><font color="#00000B">DMX learned of in 1973 over there</font></p><p><font color="#00000B">So, if we.. that's wrong</font></p></body></html> |
|
From: Frank K. <fbk...@co...> - 2004-09-29 07:57:17
|
Frank Kotler wrote:
>
> bharat kumar wrote:
> > > i have written a peice of asm code to check the PE (protected
> >
> > > mode)bit in CR0.
> > > when i compile it and link it using nasm for linux ,i am getting the
> > > the executable file.
> >
> > > but when i run the .out file i am getting segmentation fault.so ,what
> > > should i do .
...
> ... smsw may do what you want(?).
...
Hmmm, interesting... According to the Nasm manual, smsw should store
only the low half of cr0, even if given a 32-bit destination. The
results I'm getting (AMD K6) look like I'm getting *all* of cr0. Maybe
there's a glitch in my code(?). Maybe it's an error in the doc(?).
Comments?
Best,
Frank
P.S. cc'ing this to the Yahoo linux-nasm-users list, and the SourceForge
nasm-users list, as the Yahoo nasm-devel list is more or less "dead".
Guess I'll cc it to alt.lang.asm, too - they need some "signal" :)
;-----------------------
; tests smsw instruction
;
; nasm -f elf myprog.asm
; ld -o myprog myprog.o
;-----------------------
global _start
section .text
_start:
smsw eax
call eax2bin
mov al, 10
call putc
.exit:
xor ebx, ebx
mov eax, 1
int 80h
;-----------------
;-----------------
; print eax as binary
;-----------------
eax2bin:
push eax
push ebx
push ecx
mov ecx, 32
mov ebx, eax
.top:
test ecx, 3
jnz .skip
cmp ecx, byte 32
jz .skip
mov al, '_'
call putc
.skip:
xor eax, eax
rol ebx, 1
adc al, '0'
call putc
dec ecx
jnz .top
pop ecx
pop ebx
pop eax
ret
;----------------------------
;-----------------------------
; print character in al
;-----------------------------
putc:
push edx
push ecx
push ebx
push eax
mov ecx, esp
mov edx, 1
mov ebx, 1
mov eax, 4
int 80h
pop eax
pop ebx
pop ecx
pop edx
ret
;-----------------------
|
|
From: <ben...@id...> - 2004-05-25 08:06:16
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
|
From: Frank K. <fbk...@co...> - 2004-05-03 14:01:49
|
static123ph wrote: > ei can anyone help me... i have this class project and we were > reqiured to amke a program that will convert binary to its octal > equivalent using nasm...help Okay. What parts do you need help with? (I hope "help me" doesn't mean "do it for me"... we're not interested in helping anyone *avoid* learning asm, generally...) Do you know how to do a "convert to decimal"? Same idea, except that you need to divide by 8 instead of 10. Since 8 is a power of 2, we can do the dividing with shifts, instead of that nasty "div" instruction. Or, we could write a routine (or modify the "to decimal" routine, if you've got one) which would accept the base to convert to as a parameter - so with a single routine, we could convert to *any* base - 2, 8, 10, 16... or "oddball" ones, if we want. (there might be a race of seven-fingered people somewhere who would like the answer in "septal" :) To go back to the beginning... I notice you posted this to "nasm-devel" (which is pretty much "dead") as well as to "win32-nasm-users"... do you want this for dos or windows? The "convert" routine would be pretty much the same, but the "inputs" and "outputs" would be different. For a dos program, or windows console mode, you could acquire the number to convert from the command line. Or you could do it "interactive", printing some instructions and getting keyboard input. If you wanted to get *real* pointee-clickee about it, you could let the user select a number to convert by clicking on a number from a list :) Generally, you'll need a routine to get from an ascii string to "binary" (that is, to a "number" - it's the same number with the same value, whether we *represent* it in ascii as "binary", "octal", "decimal" or whatever) Since we're dealing with a "user", we better assume the input is in decimal ascii... Do you know how to do that part? Maybe you should start with something like... mov eax, 42 call my_thingie ; display result - or do you want your routine to do that? ; don't forget to "exit"! Or... how big a number do you want to be able to convert? Maybe "mov al, 42" would be enough?... Or perhaps you want to pass the number to convert on the stack? If you're not going to have the routine print out the number "on the fly", you probably want to pass the "destination buffer" as a parameter, too. If you want to make a "reusable" routine, that will work with *any* base, you'll want to pass the "base" as a parameter. These can all be passed in registers, but if you wanted your routine to be "callable from C", for example, you'd want to pass 'em on the stack. You need to answer questions like these before you start. Or maybe the "assignment" or "program specification" answers 'em. Perhaps implicitly... is early May the beginning of your course, or near the end? What sort of a program you're expected to produce probably depends on that! :) So, what kind of help do you need? (if you don't know where to start, write the comments first - step by step... then see which ones you don't know how to do :) Best, Frank P.S. If this is going to be dos code, it might not really be "on topic" on the win32 list. It would be on topic on the SourceForge "nasm-users" list - which is *not* very active... I'll cc it there - they need the business :) |
|
From: Frank K. <fbk...@co...> - 2004-04-18 23:17:47
|
Alexei A. Frounze wrote: > You never get that message most probably because you do 32-bit coding and > because of that you don't specify additional attributes such as "PUBLIC > CLASS=CODE USE16". > > If you take the original file int86xa.asm I sent to nasmdevel and move STRUC > declarations after SEGMENT declaration, you'll have this message too at > compile time. Hi Alexei, The way to get rid of that message is, paradoxically, to declare segments twice: segment .text use32 public class-code segment .text Then the "__SECT__" macro, used by "struc" (but not "xstruc"???) will be just ".text" without the attributes, and Nasm will quit its whining. The message is annoying, but actually does no harm (unless you actually *intended* to change attributes, which won't work in any case). There was some discussion, at some point, of stripping the attributes from the "__SECT__" macro to get rid of the annoyance... nothing was done... I think Ifconfig has the problem, and its solution, nailed - Nasm starts out in a default section - usually ".text" - and if there's *anything* before you declare another section - code, data, even just a label - Nasm creates the section. In the case of "-f obj" (or -f bin), it's a 16-bit section, too, which pisses off the 32-bit linker if that's what you're doing. In 16-bit code you just get an extra, unintended, section. The warning about "redeclaration of attributes ignored" can be safely ignored. Best, Frank |
|
From: Alexei A. F. <ale...@ma...> - 2004-04-18 22:14:16
|
You never get that message most probably because you do 32-bit coding and because of that you don't specify additional attributes such as "PUBLIC CLASS=CODE USE16". If you take the original file int86xa.asm I sent to nasmdevel and move STRUC declarations after SEGMENT declaration, you'll have this message too at compile time. Alex ----- Original Message ----- From: "ifconfig" <nsl...@ho...> To: "'Alexei A. Frounze'" <ale...@ma...>; "'nasm'" <nas...@li...> Sent: Sunday, April 18, 2004 10:05 PM Subject: RE: [Nasm-devel] NASM prob > Actually, Struc does exactly that equ thing. Except it uses a different > method (not equ), because it needs to count the bytes. It could be done > otherwise, I guess, but not as simply, and it would require using things > other than ResB and its friends (more Struc macros). This way it does work. > It is an odd message you are getting though - I use Strucs quite a bit and I > never got such a message - could you elaborate, and maybe paste the message? > > > Yours truly, > > ifconfig > > BAGOS > > http://bagos.sourceforge.net > > -----Original Message----- > From: nas...@li... > [mailto:nas...@li...] On Behalf Of Alexei A. > Frounze > Sent: Sunday, April 18, 2004 6:38 PM > To: nasm > Subject: Re: [Nasm-devel] NASM prob > > Thanks, > > moving the thing into the code segment makes nasm to issue warnings about > attempting to change segment/section attributes, which isn't better. > > The simplest workaround was throwing STRUC away and using EQU like this: > > ;struct WORDREGS { > ; unsigned int ax, bx, cx, dx, si, di, cflag, flags; > ;}; > WORDREGS.ax equ 0 > WORDREGS.bx equ 2 > WORDREGS.cx equ 4 > WORDREGS.dx equ 6 > WORDREGS.si equ 8 > WORDREGS.di equ 10 > WORDREGS.cflag equ 12 > WORDREGS.flags equ 14 > > and this: > > int86xLocals.Vector equ 0 > int86xLocals.Code equ 4 > int86xLocals_size equ 14 > > No other code change needed... > > Now, I wonder, why STRUC while being a very simple hack around absence of > support for structures, can't do just the same kind of thing as EQU above > does? > > Alex > > ----- Original Message ----- > From: "ifconfig" <nsl...@ho...> > To: "'Alexei A. Frounze'" <ale...@ma...>; "'nasm'" > <nas...@li...> > Sent: Saturday, April 17, 2004 9:22 PM > Subject: RE: [Nasm-devel] NASM prob > > > > I think it's because of the STRUCs you are using. When you use a STRUC, > nasm > > uses an ABSOLUTE command to jump to a different location (ABSOLUTE 0, I > > believe), and then does a __SEGMENT__ to go back to the previous segment. > > Since the default segment is text, this creates that segment. Try putting > > the STRUCs in the segment and see if this works. > > > > > > > > Yours truly, > > > > ifconfig > > > > BAGOS > > > > http://bagos.sourceforge.net > > > > -----Original Message----- > > From: nas...@li... > > [mailto:nas...@li...] On Behalf Of Alexei A. > > Frounze > > Sent: Saturday, April 17, 2004 7:20 PM > > To: nasm > > Subject: [Nasm-devel] NASM prob > > > > Hi all, > > > > some intermediate version of nasm 0.98.36 (the one on my disk, and it may > > differ from what's on the net) generates some weird "text" segment/section > > which is not in the source file (the source has only _TEXT). I'm compiling > > to intel OMF with -f obj command line option. I'm attaching the source > code. > > > > Just checked, same happens with the following taken from SF: > > nasm-0.98.35-djgpp.zip > > nasm-0.98.36-djgpp.zip > > nasm-0.98.37-djgpp.zip > > nasm-0.98.38-djgpp.zip > > nasm-0.98.38-win32.zip > > nasm98bd.zip > > So, it seems to be an old "stable" bug. :) > > > > > > I found this when looking at the linker (TLINK) map file output: > > ----------8<--------- > > Start Stop Length Name Class > > > > 00000H 016EDH 016EEH _TEXT CODE > > 016EEH 0172BH 0003EH _DATA DATA > > 0172CH 01741H 00016H _BSS DATA > > 01742H 017C1H 00080H _STACK STACK > > 017C2H 017C2H 00000H text > > > > > > Detailed map of segments > > > > 0000:0000 009B C=CODE S=_TEXT G=(none) M=test.c ACBP=28 > > 0000:009B 0017 C=CODE S=_TEXT G=(none) M=c0s.asm ACBP=28 > > 0000:00B2 00B3 C=CODE S=_TEXT G=(none) M=H_LDIV ACBP=28 > > 0000:0165 0023 C=CODE S=_TEXT G=(none) M=INT86 ACBP=28 > > 0000:0188 00AD C=CODE S=_TEXT G=(none) M=INT86XA ACBP=28 > > 0000:0235 0030 C=CODE S=_TEXT G=(none) M=CLRSCRA ACBP=28 > > 0000:0265 001F C=CODE S=_TEXT G=(none) M=GOTOXYA ACBP=28 > > 0000:0284 0038 C=CODE S=_TEXT G=(none) M=PUTCHA ACBP=28 > > 0000:02BC 0000 C=CODE S=_TEXT G=(none) M=CONIO ACBP=28 > > 0000:02BC 0032 C=CODE S=_TEXT G=(none) M=TXTATTRA ACBP=28 > > 0000:02EE 0061 C=CODE S=_TEXT G=(none) M=PRINTF ACBP=28 > > 0000:034F 139F C=CODE S=_TEXT G=(none) M=SNPRINTF ACBP=28 > > 016E:000E 003B C=DATA S=_DATA G=DGROUP M=test.c ACBP=48 > > 016E:0049 0000 C=DATA S=_DATA G=DGROUP M=c0s.asm ACBP=28 > > 016E:004A 0000 C=DATA S=_DATA G=DGROUP M=INT86 ACBP=48 > > 016E:004A 0002 C=DATA S=_DATA G=DGROUP M=CONIO ACBP=48 > > 016E:004C 0000 C=DATA S=_DATA G=DGROUP M=PRINTF ACBP=48 > > 016E:004C 0000 C=DATA S=_DATA G=DGROUP M=SNPRINTF ACBP=48 > > 016E:004C 0000 C=DATA S=_BSS G=DGROUP M=c0s.asm ACBP=28 > > 016E:004C 0016 C=BSS S=_BSS G=DGROUP M=test.c ACBP=48 > > 0174:0002 0080 C=STACK S=_STACK G=(none) M=c0s.asm ACBP=34 > > 017C:0002 0000 C= S=text G=(none) M=INT86XA ACBP=28 > > ----------8<--------- > > > > It's with this int86xa.asm (last) file. When compiling it I get the "text" > > section. I can see this with a virewer inside .obj output file as well. > > > > If I compile another file, say ioport.asm (also attached), no extra text > > section appears. > > > > Always compiling as: nasm file.asm -f obj. Run under windows 2000. Didn't > > check with DOS. > > > > Thanks > > Alex > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Nasm-devel mailing list > Nas...@li... > https://lists.sourceforge.net/lists/listinfo/nasm-devel > |
|
From: anonymous c. <nas...@ya...> - 2004-02-15 17:58:08
|
> I was thinking of using NASM as the back-end. Has this been done before? Yes. Check David Lindauer's cc386, at http://members.tripod.com/~ladsoft/cc386.htm. Or look for lcc. The NASM 0.98.x source distro contains a sub directory for that. __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html |
|
From: Phil I. <ph...@id...> - 2004-02-10 00:24:27
|
I'm developing a compiler (non-commercial!), primarily for my own use ('cos
I'm a bit if a geek), but if anywhere near useful will be made available
publicly.
I was thinking of using NASM as the back-end. Has this been done before?
The compiler is being developed on a Windows machine, with implementation
being for both Windows and linux (he says with his fingers crossed behind
his back).
I'm developing the compiler primarily for intellectual stimulation, in case
anyone asks "why another..." etc.
Regards,
--
Phil Ide
|
|
From: Frank K. <fbk...@co...> - 2004-01-17 22:07:05
|
mathi maaran wrote: > hi everyone , > > I am working with win32 asm programs(gui) > i create PE executables with nasm alone (without a linker); > i.e the -fbin option . > i got a include file pemac.inc and it works well [disclaimer] The Nasm development team is not responsible for the contents of any include files you may be using. If you discover a problem with anything in the "misc" directory, we'll try to fix it, but there are a *lot* of include files floating around, and they're not all "right"... [/disclaimer] > but when i use resb or resd nasm gives a warning about the use of these > commands > in the program > i don't know whether it is a bug. Nasm will warn if "res?" is used in a non-.bss section. "times" should be used instead, but Nasm'll just zero it, so it does no harm. Doesn't give you a .bss section, but it should still work. > even though i name the code section with diff names nasm always refers > to it as .text section. That suggests that your intended section name is being ignored (Nasm defaults to ".text"). "pemac.inc" redefines things all over the place, but it looks to me like it wants "BSS" - uppercase and no dot - in order to generate a ".bss" (case insensitive) section. > i use 0.98.32 That could be a problem right there. Some "multisection support" was added in 0.98.08. A bug involving "align" was found, and in the course of fixing it, some "ill advised" (according to some) features were found. In 0.98.36, a *completely* re-done "multisection support" was added (much more powerful and flexible, IMO). If you stick to the "known" section-names, ".text", ".data", and ".bss", you won't notice any difference, but "homemade" section names behave slightly differently. I don't know if it'll help, but I'd advise updating (to 0.98.38 - 0.98.37 is buggy as hell... mostly in the "-f elf" format, but...). > please clear my doubt Well, not at first shot, I'm afraid... I'll look into it more, and I'll cc this reply to the "nasm-users" list. NuMIT-or hangs out there, and can probably pinpoint your problem instantly. By coincidence, I just tried my first example using "pemac.inc" - actually, I modified "pemac.inc", so I *know* there exist modified versions :) There's a "bug" (IMO) in the dos stub (doesn't set ds), but I modified it to use a "special" stub - the program in question was NuMIT-or's "shutdown" example, and I didn't figure "this program requires windows" was really true, just to shut down (I modified the original program to "reboot" rather than "shutdown", too). So now it works from dos, too! (if anyone cares...) This program doesn't have a .bss section, so I don't have an example of how that's supposed to be done :( I don't think this is a Nasm bug, so further discussion should maybe go to another list - the SourceFrog "nasm-users" list or the Yahoo "win32-nasm-users" list would probably be most appropriate. We *may* need you to "post the code", and/or indicate the date and file-size of the "pemac.inc" you're using (my modification may not be the only one out there :) I'll cc this to the Yahoo list, too - that being the most popular one. Please drop the nasm-bugs list from any replies - I really don't think it's a Nasm problem... Best, Frank |
|
From: Frank K. <fbk...@co...> - 2004-01-13 16:06:57
|
prz...@po... wrote: > When I want to use 32 bit code: Please take it to the Nasm-users list: http://lists.sourceforge.net/lists/listinfo/nasm-users We're trying to keep the "developer's list" for legitimate development discussion - makes it easier to find stuff in the archives when we forget what in hell we decided to do :) Sorry for not (yet) answering your post on the "forum" - like the careless butcher, I've gotten a little behind in my work :) > [bits 32] > > And I want to use 32 bit registers: > push ebp > mov ebp, esp > > Nasm assembles it as: > push bp > mov bp, sp How are you determining this? If you're using ndisasm to disassemble it, try the "-u" switch. > And when I write: > push bp > mov bp, sp > > It is then assembled as: > push ebp > mov ebp, esp > > Don't you think it is strange? I think it would be pretty strange if Nasm wasn't doing 32-bit code correctly and no one had noticed it before this! I suspect that your expectations are incorrect. Here's some code: bits 16 ; note that the square brackets aren't necessary, ; but the space *is* - a common error is to write ; "bits32", which to Nasm is just a label(!) push ebp mov esp, ebp push bp mov sp, bp ;--- bits 32 push ebp mov esp, ebp push bp mov sp, bp Here's ndisasm's output as 16-bit code - this is what the CPU would see if it were in 16-bit mode: 00000000 6655 push ebp 00000002 6689EC mov esp,ebp 00000005 55 push bp 00000006 89EC mov sp,bp 00000008 55 push bp 00000009 89EC mov sp,bp 0000000B 6655 push ebp 0000000D 6689EC mov esp,ebp And here's ndisasm's output with the "-u" switch - what the CPU would see if it's in 32-bit mode: 00000000 6655 push bp 00000002 6689EC mov sp,bp 00000005 55 push ebp 00000006 89EC mov esp,ebp 00000008 55 push ebp 00000009 89EC mov esp,ebp 0000000B 6655 push bp 0000000D 6689EC mov sp,bp Note that the "66h" size override prefix "toggles" the interpretation of the instruction. "mov ax, bx" in 16-bit mode, and "mov eax, ebx" in 32-bit mode are the *same* instruction. The prefix is necessary only if you want the "other" size. If that's not clear... I don't think you'll find too much in the Nasm doc - you may need to consult Intel or AMD manuals. (hope you like pdf - I don't!) > I use the coff format Okay, that defaults to 32-bit mode. The "[bits 32]" isn't necessary (but does no harm). In "-f bin" or "-f obj" the default is 16-bits, and you *do* need to tell Nasm you're doing 32-bit code (with "bits 32" at the top of the file, or with "use32" in the section declarations - both is okay). "-f coff" is for djgpp. If you intended this for Windows, MS's varient of "coff" is known to Nasm as "-f win32". The two are near enough the same that they can be used interchangeably in some simple cases, and will work, but eventually you'll run into something that *is* different. I'm not sure which you actually want... If you're doing djgpp (seems to be a "rare bird" these days), I may be able to come up with some examples that are no longer available on the web (AFAIK... used to be "phoenix.gb.net" or something, but it's dead... "gaz"s package). > What do I have to do to use normal 32 bit syntax in a 32 bit code? Not a thing! That's easy, ain't it? :) I *think* the only problem here is that you're interpreting Nasm's output as if it were 16-bit code. If I'm wrong, get back to us! Best, Frank |
|
From: Yeoh H. <ye...@ye...> - 2004-01-07 13:25:17
|
Hi everyone, :-) Thanks NuMIT_or and Frank for your excellent source codes. :-) I'm still a newbie at Linux programming in asm, C and C++. So I'm thinking of these few areas to focus on: syscalls, glibc, Xlib, GTK+ and Gnome. Are there any other areas that I should also cover? I'm thinking of starting with C and asm. There are many C example source codes in Linux and trying to translate them to asm might be a tough but rewarding experience. Am I barking up the wrong tree here? :-) Thanks for any suggestions or comments. Best Regards, Yeoh -- |
|
From: Frank K. <fbk...@co...> - 2004-01-07 03:32:33
|
Hi, groups... Wow! We may not have much to say, but the examples-bin is lookin' really pretty! Yeoh's been uploading Windows examples at a steady rate, and NuMIT_or just uploaded a flock of 'em. I just uploaded a couple Linux examples - rudimentary, as usual with me, but at least there's something there. Maybe we could get some Xwindows examples from somewhere (hint, hint)... The "arabeske" example I posted isn't so hot. It "worksforme", but I have some questions about it. If I ask for a video mode higher than the driver supports for my card (apparently), it locks up the machine (I thought Linux wasn't supposed to do that - asm programs don't count, I guess :). This suggests that if someone tries it with a card that doesn't support even 640 x 480 x 256 with LFB, it'll hang there too(?). This isn't so great! Don't try it on a multi-user system without hollering "a.out" first! The other thing that puzzles me about it, is that the speed seems to slow down periodically. It runs along smoothly (not that fast), but every few minutes it gets "jerky", as if it "stalled" every few frames (kind of a neat effect, actually - I may look into doing it on purpose). It doesn't *seem* to happen at any particular point in the program, just "every few minutes". After 15-30 seconds, it goes back to normal. Possibly something else running on my system - I don't know what. (I'm still pretty clueless in Linux, and probably shouldn't be attempting to program in asm, but "fools rush in...") Another problem is that it has to be run as root. Unless I'm mistaken, there's a way to give the program root privileges, even if the user isn't root(?). I assume there are caveats. I'm kinda scared to mess with that... It runs with just the default palette - it looks, judging from Jan Wagemaker's example that I kinda "went by", as if we've got permission to the ports, so the palette can be changed that way, as well as by the library calls. I may experiment with that next... The other two examples, "hello2u" and "hamming" aren't 100% robust, but I guess they're okay... Any comments or improvements welcome... as are more examples! Best, Frank |
|
From: Seadhert <sea...@ya...> - 2004-01-02 14:20:39
|
Hi, i am new in assembly language (and in programming after all), but if i´m going to program i´m going to do this for the GNU community :). I will be there bye |
|
From: Yeoh H. <ye...@ye...> - 2004-01-02 08:50:22
|
Hello everyone! :-) Happy New Year. :-) Well, this year I'm starting my adventure into Linux programming using NASM. And I've created a Yahoogroup: http://groups.yahoo.com/group/linux-nasm-users/ for all to share their source codes or ideas. Best Regards, Yeoh -- |
|
From: Frank K. <fbk...@co...> - 2003-12-19 19:42:07
|
E wrote: > Hello, > > I have this hello world program and it works fine > > org 100h > mov dx,msg > mov ah,9 > int 21h > mov ah,4Ch > int 21h > msg db 'Hello, World!',0Dh,0Ah,'$' > > So far I have read that int 21h is the dos service interrupt and that > because I have put the number 9 in register ah it will print the > string Hello World on the screen. Is this correct? So far, so good! > I would like to knon where I can find information about other > interrupts and what they do depending on what is in register ah. It > would be nice to have a list of all the interrupts all the number that > can be used in register ah with the interrupts. I have looked on the > Internet and I can't find a lits like that. Thanks in advance. You want Ralf Brown's Interrupt List! http://www-2.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html Online version at: http://www.ctyme.com/rbrown.htm IIRC, D.J.Delorie has an html version on his site, too. (delorie.com) That's very complete. If you find it intimidating, or too large a download, google for helppc21.zip - should be on Simtelnet (what's left of it). That's got commonly used interrupts and ports. As you've probably noticed, the yahoo list is pretty much "dead". You might be better off asking questions like this on the Nasm-user's list. http://sourceforge.net/mail/?group_id=6208 (that list isn't too active yet, either, but it's "up and coming"... we hope) I've cc'd this to that list - it's a "FAQ", pretty much. If and when you're ready to tackle Windows programming, join the yahoo group: http://groups.yahoo.com/group/win32-nasm-users - not much chit-chat there, either, but the "files" section is developing a *great* set of example files - Yeoh is uploading them at a rate of about one per day! Best, Frank |
|
From: Yeoh H. <ye...@ye...> - 2003-12-17 01:47:55
|
----- Original Message ----- From: "steve" <sa...@te...> To: <nas...@li...> Sent: Wednesday, December 17, 2003 8:00 AM Subject: [Nasm-users] Nasm Win32-GUI Docs'? > Hey guys, > > I'm new to Nasm, but not to Asm and I have little interest in using > macro packages, but I am interested in Win-GUI programming with Nasm. > I've been looking for some documentation on this. > The Nasm Doc's are of no help, as they don't even mention gui > programming. > Is there any documentation of using the Win API with Nasm ? > > Sincerely, > Steve > Hi Steve, Yes, the Nasm docs do not mention gui programming and IMHO it is "acceptable". :-) Nasm outputs several object file types and can be used in Linux, Windows and other OSes. So, the Nasm doc focuses on NASM only. Usually, to build Win32 GUI apps, you'll need NASM plus a resource compiler and a linker. NaGoA comes with NASM + GoRC, the resource compiler + Alink, the linker. To build Win32 GUI applications using NASM, there are two packages that I know of: 1. NaGoA at http://www.visual-assembler.pt.vu/ 2. Sheroc's package at http://www.freewebs.com/remains/NASM32PACKAGE.exe As for documentation on using Win32 API with Nasm, AFAIK, there isn't any documentation bundled with the NASM distribution but there are several websites that do provide Win32 GUI programming tutorial using NASM. One such site is: http://www.deinmeister.de/wasmtute.htm And the NaGoA site has many example codes, tips and tutorials on coding Win32 programs. Finally, if you are looking for very simple Win32 NASM source codes, you can find a collection at: http://groups.yahoo.com/group/win32-nasm-users Both NaGoA and Sheroc package do come with include file which contains: Win32 defines, equates and structures and also custom macros. You can opt not to use the custom macros but you'll find that the Win32 defines, equates and structures does simply coding for Win32. :-) Best Regards, Yeoh -- |
|
From: steve <sa...@te...> - 2003-12-16 23:54:25
|
Hey guys, I'm new to Nasm, but not to Asm and I have little interest in using macro packages, but I am interested in Win-GUI programming with Nasm. I've been looking for some documentation on this. The Nasm Doc's are of no help, as they don't even mention gui programming. Is there any documentation of using the Win API with Nasm ? Sincerely, Steve |
|
From: Yeoh H. <ye...@ye...> - 2003-12-07 04:21:39
|
----- Original Message ----- From: "Frank Kotler" <fbk...@co...> To: <win...@ya...> Cc: <nas...@li...> Sent: Sunday, December 07, 2003 10:44 AM Subject: Re: [win32-nasm-users] Displaying 64-bit unsigned integers Frank Kotler wrote: > That routine would be better if it accepted a flag to use the comma or > not - sometimes you don't want it. It really isn't useful very often, > but it prints an impressively long string of digits... or maybe I'm just > easily impressed... > This code snippet is a very useful building block. :-) One of the reasons I started this group is to create a repository of Win32 NASM code snippets, very basic building blocks. We can later use these blocks, modify and piece them together to form useful Win32 programs. :-) > We haven't got too many subscribers to these lists yet - maybe we should > "announce" 'em again - but we're developing a nice repository of Nasm > examples. Better than anything that's been available before! Even the > Nasm users who aren't aware of it yet thank you! > Yes, for now there aren't many members. I'll focus on building the repository. :-) And if any question arises in the Source forge NASM forum, if I can help, I'd try to post an answer and also the URL to the group. And in later months or years, when the repository gets really big, like hundreds or even thousands of code snippets, I think, there will be more members. :-) Announcements are a good idea. I posted an annoucement at my site http://www.yeohhs.com and there is also one at NaGoA's website. As for postings to UseNet, it has to be done tactfully. I'm not familiar with asm groups in UseNet. Are there Assembly Programming FAQ postings to these groups monthly? Perhaps we could add an entry to the Assembly Programming FAQ? > Best, > Frank > Best Regards, :-) Yeoh -- |