So here is my story. I am using something called HLA, High Level Assembler, which is associated with an online book called 'The Art of Assembly Language' by Randall Hyde. I do actually intend to learn the lowest level assembly too, but the book is designed for teaching, with the idea that you don't have to rewrite the same stuff over and over again, you just use their functions in the library.
The reason this has anything to do with MASM is because actually, it uses MASM and I have MASM on my computer. I don't remember exactly how it works, but you start off writing things in HLA, and then it actually assembles it using MASM. So, you can write a program using all the MASM syntax and it will understand what you mean, but you can also use the high level functions too.
Well, I was doing fine through the very beginning of the book. I was working on this last year. I worked on it for a few weeks, and then all of a sudden I got to an input-output chapter where they mentioned a function that makes it go beep. I tried to tell it to go beep, and it did not go beep. The perfection of my universe was shattered, and I took a break from the book to go curl up in a ball and cry.
Now that I have recovered from this trauma, I'm wondering how I can directly use MASM to make the computer go beep, instead of using the HLA function. This HLA and the book was written a long-ish time ago, like 2000, and so maybe something has changed so that my little netbook doesn't know what to do. It says that the beep comes from printing an ASCII character.
I am able to make my computer beep if, for instance, I have a key pressed down while the computer is starting up. I assume that's the type of beep that this is supposed to make.
Dell Inspiron mini, Windows 7 starter, Intel chip... but I'm not sure what would be relevant. And it's a couple years old so all the writing is worn off the little stickers underneath it that have all the specifications on them.
Here is what the book says: "In addition to the nl constant, the HLA standard I/O library module defines several other useful character constants. They are: stdio.bell - The ASCII bell character. Beeps the speaker when printed." Etc.
So here's the type of thing you see with HLA. By my understanding, I can just start talking to MASM directly if I want to at any point in the program, instead of using HLA. Any suggestions for what I can say to MASM to try to make the thing beep?
program Bell2;
#include( "stdlib.hhf" );
#include( "stdio.hhf" );
begin Bell2;
stdout.put( "Why won't this beep?", stdio.bell );
end Bell2;
(Note: I keep calling them 'functions,' but actually I'm not clear on what's a function, what's a macro, what's a constant, and so on - I think he said the stdio.bell was a CONSTANT, now that I look again.)
You real problem is that HLA is no longer properly supported where MASM is much better understood and has a much larger user base. You need to know what OS platform you want to use (DOS versus Windows) and learn the details of what you want to eventually write. Windows has a function "PlaySound" that can run a WAV file that can be anything you like from music to beeps.
Now among other things you computer may not have the hardware to sound an ascii bell character as it would be very rarely used these days. If you go for the later stuff using MASM you can do almost anything but its more work to learn it and you also need to learn the Windows API function.
I do know it has the hardware to beep, because it beeps if I hold down a key while the computer is turning on. That beep comes from the internal computer speaker. That's the one I'm trying to make beep. It says you use an ASCII character that causes this speaker to beep when printed. It isn't a .wav file type of sound. HLA is based on MASM and uses MASM as its assembler, and I am able to write a program using MASM syntax within an HLA program, so I'm actually looking for MASM code, not HLA code. The HLA program allows you to write something either in MASM or HLA.
Actually, you might be right, I just looked it up in Wikipedia and did what they said. It's the bell character in ASCII. Wikipedia said you can also get this by typing 'echo ^G' in a command prompt, and I did that, and it did not make the noise. So, apparently that's not the same thing as the other alarm that I hear if I hold down a button while turning the computer on.
I don't actually mind if HLA is no longer supported. The book eventually gets around to directly teaching assembly language with MASM.
You have not told us yet whether you are writing 16 or 32 bit code. In 16 bit code you send an ASCII bell to STDOUT and you get a BEEP, 32 bit code does not work that way. Win7 in 64 bit does not support 16 bit DOS so anything you need to write will have to be 32 bit or later. Windows does not support the 16 bit interrupt and if you want to make a sound, you will have to use a Windows API function and play the default sound for a beep set up in your control panel.
very few members have played with HLA, much :P
might as well be greek to most of us - lol
but, it's fairly simple if you have the masm32 package installed
;###############################################################################################
INCLUDE \Masm32\Include\Masm32rt.inc
;###############################################################################################
.CODE
;***********************************************************************************************
main PROC
INVOKE Beep,800,100
INVOKE ExitProcess,0
main ENDP
;###############################################################################################
END main
Vista had problems with Beep, as i recall, but it should do MessageBeep...
;###############################################################################################
INCLUDE \Masm32\Include\Masm32rt.inc
;###############################################################################################
.CODE
;***********************************************************************************************
main PROC
INVOKE MessageBeep,-1
INVOKE ExitProcess,0
main ENDP
;###############################################################################################
END main
as i recall, the user must have a sound selected for "Default Beep" (control panel, sounds)
because of the "Vista problem", many of us prefer to use PlaySound, as Hutch suggested
that's a bit more complicated because it involves carrying a sound file as resource
this post in the "old forum" has an attachment....
http://www.masmforum.com/board/index.php?topic=15882.msg131239#msg131239 (http://www.masmforum.com/board/index.php?topic=15882.msg131239#msg131239)
You can try this from a CMD prompt.
Type "echo" then 1 space then ALT + 7 then hit enter.
As Hutch & Dave already mentioned, HLA is not the best option. Masm32 with PlaySound from the Windows API is the way to go if you want to know what's going on under the hood. If you care a bit less, you can use a library, too:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
Sound "880:500" ; plays frequency 880Hz for 500 ms; allowed separators are space, tab, / and :
Sound 111 ; plays a wav resource with ID 111 (in rc file: 111 WAVE "hello.wav")
Sound "hello.wav" ; plays a file directly (wav only)
Sound "hello.mp3" ; plays a file in its associated player
Sound "大桥在混乱的水.mp3" ; Unicode names are allowed
Sound Utf8$(wCL$()) ; even if passed via the commandline
Exit
end start
Note this does build fine if MasmBasic is installed, even with \Masm32\qEditor.exe, but of course, the mp3 and wav files must be present in the executable's path, and resource #111 must be included; comment out what is not needed or not possible.
NICOLE74,
This might help: Waveform Audio, MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/dd757715(v=vs.85).aspx)
As HUTCH mentioned in his first post, PlaySound (https://msdn.microsoft.com/en-us/library/windows/desktop/dd743680(v=vs.85).aspx) is the simplest audio function to use. There's also: MessageBeep (https://msdn.microsoft.com/library/ms680356.aspx).
...By the way,...I should warn you about DAVE. He's our official MASM Forum Joker. Very knowledgeable programmer, though,...
(PullMyFinger by DednDave) is one of his better apps. It's designed to drive newbies crazy:
;PullMyFinger by DednDave - Jan 2011
include \masm32\include\masm32rt.inc
include \masm32\include\winmm.inc
includelib \masm32\lib\winmm.lib
IDS_PMF EQU 1000
.DATA?
hInstance dd ?
.CODE
_main PROC
INVOKE GetModuleHandle,NULL
mov hInstance,eax
print chr$('Esc to Exit, Any Other Key to Pull My Finger'),13,10
jmp short loop01
loop00: INVOKE PlaySound,IDS_PMF,hInstance,SND_RESOURCE
loop01: call crt__kbhit
or eax,eax
jnz loop02
INVOKE Sleep,50
jmp loop01
loop02: call crt__getch
cmp eax,1Bh
jnz loop00
exit
_main ENDP
END _main
Hi Nicole,
Everybody's already told you what I can tell you, but it might be confusing, some extraneous info ... As a previous post put it,
Quote from: Nicole74So that's more than anybody wanted to know
So here's my take on it.
First, Randall Hyde and HLA is (partly) obsolete. This beep is a good example: that technique doesn't work on your computer; there will be more like that. So I'm afraid u need a different tutorial, more on that later.
Second, if you haven't downloaded masm32 package, and installed it, you should. That's the best way to move ahead, especially if you use this board. Go to www.masm32.com (http://www.masm32.com), click on "download" at the top, etc. Ask if any problems.
As for "beep"ing - once you have masm32 installed dedndave's first program is the quickest way to beep. Here it is again but with a longer beep (note to dedndave, some computers don't do 100 ms right)
;###############################################################################################
INCLUDE \Masm32\Include\Masm32rt.inc
;###############################################################################################
.CODE
;***********************************************************************************************
main PROC
INVOKE Beep,440,1000
INVOKE ExitProcess,0
main ENDP
;###############################################################################################
END main
That's great but how do you run this code? I'm going to assume you don't already know (if you do please excuse my "talking down" at you). Here's a quick precis of the steps involved, ask if trouble occurs (do NOT
Quote from: Nicole74...curl up in a ball and cry
)!
1. Make a new folder anywhere u want
2. Make a new text document (not rtf or anything, straight text) in your new folder
3. Name it beep.asm (you'll have to change the file extension, it will ask r u sure, say yes)
4. Now double-click and it will come up blank in masm32's Qeditor (assuming you installed it right)
5. Grab the code above by clicking on Code:[select], which will Copy it to the clipboard
6. Paste it into beep.asm, and save it (from the file menu, or hit CTRL-S)
7. From "Project" Menu: Console Assemble & Link (towards the bottom)
8. Then Project: Run Program
9. DOS window will flash and it will beep 1 second, concert-pitch A
10. If you're lucky
After that the world's your oyster ... but you'll need a bit more guidance b4 comfortable with masm32 environment. Perhaps jj2007's tutorial (http://www.webalice.it/jj2006/Masm32_Tips_Tricks_and_Traps.htm) would be right for you. May be a bit intimidating for beginner, there are other options.
Randall Hyde's book (1st edition anyway) is full of good info and your time hasn't been wasted, but as I say u need to get away from HLA. Once u get masm32 working recommend continuing with the parts that are applicable but ignore those that aren't :biggrin:
Good luck, c u later
My frustration tolerance is increased when I can complain to this support group. So I will just take a walk and get some fresh air and when I come back I will try some of these things. I did try alt-7 (typo, I didn't mean alt-F7), and that didn't work either, but I want to try it again because a google search made it seem like there was more than one way to do it, with the details differing. I'm not sure if I'm programming in 16 bit or 32 bit, because that makes it sound like I have a choice or it's a mode or something - but my operating system itself says that it's 32 bit, which doesn't necessarily mean anything to me. I have a hunch that 'pullmyfinger' might result in a low frequency buzz. I will be back.
I sense you don't want to abandon Randall Hyde, after all u've been thru together .. ! There is a masm32 forum for Randall Hyde's HLA (http://masm32.com/board/index.php?board=11.0) specifically but as you see there's almost no activity. Recommend u try our approach a bit, can always go back. I did some research on this topic ...
Found this site, asmcommunity.net (http://www.asmcommunity.net/forums/topic/?id=10149) where Mr Hyde himself was a member, in 2003. Here's what Randy Hyde (that's his handle) says:
Quote from: Randy HydeI would comment that in one sense, HLA is *inappropriate* for advanced assembly programmers. Because advanced assembly programmers already know an assembly language and have some strong expectations about what an assembler should look like. Regardless of the features HLA supports, the fact that its syntax is radically different than a traditional assembler is going to create problems for them ...
- so if this were 2003 u should definitely go post your questions there. But 8 years later that site decided HLA was obsolete. Here's relevant thread (http://www.asmcommunity.net/forums/topic/?id=30735), about porting HLA to MASM (the guy was giving up on HLA) and a quote, from 2011, with my italics:
Quote from: HomerHistorical note, after he [Randall Hyde] failed and went his way ... not that I don't think you are a legend Randy, you opened my eyes!
- This supports our view that HLA is basically dead. But at least asmcommunity.net has had MUCH more interest in it, so you should explore that site. We'll be happy to "support" you whatever road u decide on ...
Finally, ALT-7 and 16 vs 32 bit are very good examples of what I mentioned b4, "too much information"; you're using 32 bit, BTW, and ALT-7 bell won't work on your computer.
Historical note, in the past, my advice has often turned out to be wrong ;)
Quote from: dedndave on May 31, 2015, 02:28:55 AM##############################################
INCLUDE \Masm32\Include\Masm32rt.inc
Okay... Before I tried this, I looked in the masm include folder to make sure I had this. I don't. I just have masm32.inc, but not masm32rt.inc. I had actually tried to download and install the latest MASM, but it told me it was already installed (due to my having installed HLA), so I have an older version. I googled 'how to uninstall MASM,' because it wasn't listed in the control panel's 'uninstall a program' screen, and I discovered that MASM has to be just sort of... deleted, somehow, which I am kind of scared to do. They said that it was a small thing that doesn't attach itself to stuff all over your computer and it was supposed to be sort of independent somehow, so you were able to delete it.
Anyway, now that I'm thinking about this, would it be possible to just download the masm32rt.inc include file, and then just put it into the include folder with all the other include files?
I could also just try to follow the advice about how to uninstall (delete) MASM, but I'd have to google it again, and then install the new version that I downloaded.
So... I didn't get to test this yet.
If it ain't one thing it's another! Probably more hiccups coming up, too.
masm32 is in fact a very "small thing" which doesn't modify the registry or any of that garbage (which is very good). Don't think it best to just get masm32rt.inc; how many more incompatibilities are there? People like hutch could answer that q. BTW, but not me. However don't blame u not wanting to delete the old one, what if u want to go back to HLA?
So, two solutions. One, change the name of the masm32 folder to masm32_HLA, then install masm32 latest version. Should work without a hitch. Later, can just delete that folder (or, call it masm32_NEW) and rename the old one back.
Or, here's the file, you can try putting masm32rt.inc in your include folder as u said.
comment * «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
The MASM32 Runtime Library include file.
Differing from most compilers, MASM does not contain any built in
run time library so it is difficult for a programmer starting with
MASM to to get any code up and running without having to learn a lot
of extra information just to do basic things.
This file simplifies entry into assembler programming by making the
full capacity of the MASM32 library, macro system and include files
available to programmers undertaking this quest.
It specifies the normal conditions for building a 32 bit Windows
program with the minimum processor type, memory model and the need
for case sensitive capacity.
The include files are declared in the correct order so that the
windows.inc file is always first followed by static libraries and
import libraries for Windows API functions.
Where there is a corresponding library for either static or import
libraries, it is included after the include files.
NOTE : It is to the advantage of the programmer once they have their
basic code up and running to properly understand the architecture
of a MASM executable file so that they can construct their own
projects to more accurately reflect their own application design.
««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««« *
.486 ; create 32 bit code
.model flat, stdcall ; 32 bit memory model
option casemap :none ; case sensitive
; include files
; ~~~~~~~~~~~~~
include \masm32\include\windows.inc ; main windows include file
include \masm32\include\masm32.inc ; masm32 library include
; -------------------------
; Windows API include files
; -------------------------
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Comctl32.inc
include \masm32\include\comdlg32.inc
include \masm32\include\shell32.inc
include \masm32\include\oleaut32.inc
include \masm32\include\ole32.inc
include \masm32\include\msvcrt.inc
include \masm32\include\dialogs.inc ; macro file for dialogs
include \masm32\macros\macros.asm ; masm32 macro file
; libraries
; ~~~~~~~~~
includelib \masm32\lib\masm32.lib ; masm32 static library
; ------------------------------------------
; import libraries for Windows API functions
; ------------------------------------------
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Comctl32.lib
includelib \masm32\lib\comdlg32.lib
includelib \masm32\lib\shell32.lib
includelib \masm32\lib\oleaut32.lib
includelib \masm32\lib\ole32.lib
includelib \masm32\lib\msvcrt.lib
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
Now, I could put this in a zip file for u but didn't for a couple reasons. There may be copyright issues - can't imagine hutch would care, but I want it to be visible so everyone sees what I'm doing. Also, so u can see how simple the file is, and read the comments. Finally, I'm wondering if you'll have a little problem putting this into a file. So, make new text file, rename it masm32rt.inc, copy this code into it, put it into include directory. If it works, great, if not, might be one or two simple fixes needed.
If you do it this way instead of installing new masm32, expect something else to go wrong sooner or later ..
Good luck, !
So, I do already have QuickEditor, which was mentioned somewhere when I was doing HLA, so I already knew that existed and have been using it. I just looked in the 'help' button there, and there's a bunch of stuff that I should read. I don't yet know the basics of how to use QEditor to assemble and run the programs, so, no, @rrr, you're not talking down to me if you assume the worst - I don't actually know what buttons to push in QEditor yet. What I was doing before was using notepad, then using a command line to run HLA. Now I'm going to start attempting to use QEditor and try to interact with MASM directly and bypass HLA, so I'm at the very beginning of learning how to do that - I also just downloaded three volumes of pdf files from Intel, the reference manuals, but those will be probably too hardcore for me as of now, although I didn't actually start reading them yet.
So, my goal right now is simply to start using MASM directly without using HLA. I did want to stay attached to the HLA book, and I might keep reading it just because I like the writing style. He was a teacher, so he had a lot of experience explaining it to the students, I guess.
Okay! I changed the old MASM folder name to MASM_HLA, and then installed the newest MASM. I am now up to date with that, and I'm gonna start reading some tutorials, help files, and readmes. I am starting from scratch. This will make it easier to communicate in the forum without having to troubleshoot every little thing.
:t
> I did try alt-7 (typo, I didn't mean alt-F7), and that didn't work either
Well, the problem is you have modified the statement, I tested this on Win7 64 bit Ultimate and it works perfectly so no, it was not a typo.
Type in "echo", then 1 space, then hold down the ALT key then press the number seven (7) [not the F7 key]. When you release the 7 key you should get an unprintable character after the space. Then release the ALT key and press ENTER.
Something you need to understand, the MASM32 SDK is aimed at programmers who already know how to write Widows API code and are at least familiar with writing assembler mnemonic code and unless you have this background your task is nearly impossible. Unless you are confident in writing API based compiler code you don't yet have enough experience to write assembler code and the best advice is to find a compiler that you can learn with and ge5t going from there. You can always come back to assembler programming once you have enough experience.
and it has to be the 7 on the ten-key pad - not the one up top :biggrin:
hi hutch,
AFAIK you must use the "7" on the number pad, it doesn't work with the "7" on the keyboard (under the &). Using that, ALT-7 just gives you a "7". And, Nicole74 said she's using a netbook: they don't have number pads (neither of mine do, anyway). So, as I told her: doesn't work on her computer. Don't doubt it can be done on a netbook, but needs some other key combination.
Of course this isn't a vital issue, more important is the q. of whether a beginner (not, after all, a *complete* beginner) can use MASM32 happily. Personally I think she can do it, but what do I know? Fortunately we can just wait and find out!
Tell u what, if u want to bet enough money on it - say, $10,000 - I'm up for it. Then I could PM her, give her the necessary code (to prove she's learned it), and we could split the difference. $5,000 bucks each, even if they're Aussies - would be worth it! And, she doesn't have to learn anything! What do u say, is it a deal?
p.s. (in case it's not obvious) just kidding :biggrin:
Quote from: Nicole74 on May 31, 2015, 11:06:16 AM
Okay! I changed the old MASM folder name to MASM_HLA, and then installed the newest MASM. I am now up to date with that, and I'm gonna start reading some tutorials, help files, and readmes. I am starting from scratch. This will make it easier to communicate in the forum without having to troubleshoot every little thing.
Sounds OK. There are many nice proggies to study in \Masm32\Examples. In the beginning, you can stick to console mode, because creating a full-fledged Window with buttons and all that is a little bit more difficult.
Get familiar with the Masm32 macros, such as print and rv:
print "Hello World", 13, 10
prints hello world and a newline (=carriage return plus linefeed); trashes registers eax, ecx and edx, so if you still need ecx (for example):
push ecx
print "ecx is safe"
pop ecx
mov wc.hIcon, rv(LoadIcon, rv(GetModuleHandle, 0), IDI_APPLICATION)
To understand, google
LoadIcon GetModuleHandle IDI_APPLICATION and see what the C/C++ guys are using. In contrast to Hutch, I think assembler is a lot easier than all the {brackets} and; semicolon; stuff;
P.S.: On my Win7-64 notebook, the only way to get the beep is typing echo [space] [Ctrl G], [Return]
Printing ascii character 7 to the console, whether I do it with print chr$(7) or printf("%c\n",7), on my Windows 8.1-64 laptop plays Windows Foreground.wav.
Yeah, it's a netbook without the numeric keypad. So it only prints the number 7.
I really want to learn it now that people are betting! :D
If I used virtual 8086 mode, would I be able to send signals to the speaker directly? I was just reading about not being able to do 16 bit interrupts because of protected mode in the 32 bit computers.
And yeah, sadly, not even 'echo (space) ctrl-g' works in the command prompt.
Neither the 'invoke beep' nor the 'invoke messagebeep' programs worked either, from dave and rrr . I did also un-mute my speaker, in case I was to expect a sound coming from the normal speakers like a Windows error message type of beep, but it didn't happen.
I wondered if it matters that this computer is only Windows 7 starter, but I don't think so...
you are talking about writing 16-bit programs, rather than 32-bit or 64-bit programs
i suggest you skip 16-bit, altogether
when i started writing 32-bit code, i found that looking at the masm32 library routines
was a good way to learn
they can be found in the masm32\m32lib folder
those, and the examples that Jochen mentioned, are your fastest way to learn
if making sound is your interest, the multi-media functions are what you want
in the examples...
Bill Cravener folder:
mvolume
playmidi
PlayMP3
also...
exampl03\lcd
exampl04\jacts
exampl07\sleepex
i found those by using windows explorer search and looking for files that contain "winmm"
winmm.inc and winmm.lib are needed for programs that use the multi-media functions
Nicole74,
I don't know why the program using "INVOKE Beep,440,1000" doesn't work. Now, dedndave mentions "if making sound is your interest...", but I'm assuming it is NOT a particular interest, right? Rather that's just the first problem u ran into in your book, that u asked us about. In that case, for the time being don't worry about it. Instead do as jj2007 suggests, use print to see what's going on in your console mode programs. For instance replace that "beep"ing Beep statement with
print "Hello World", 13, 10
and see it print the message to the console. Of course, it will just flash a DOS Window and disappear ... couple ways to handle that. Most people use "wait_key" but I prefer to hit CTRL-D in Qeditor (or File Menu - Cmd Prompt) to bring up a DOS console. Then launch the prog from the command prompt (in this case, type beep and ENTER). That way the "hello world" stays put!
And so on. Read the examples mentioned; try to make each one actually work for you b4 going to the next one; etc. Be nice to jj2007, he's had a lot of experience with newbies and knows everything. (Everybody else knows everything also, of course, but I think he's particularly good in the newbie dep't)
U can try MichaelW's suggestions for printing the character "7" also, but as I say, mainly just learn masm32 in general. The beep problem will come out in the wash, solve itself as u go along.
Alternatively, take this problem to a higher authority! Go to "I hate Dell" (http://www.ihatedell.net/forum/phpBB3/viewtopic.php?f=32&t=9091%5B/url) web site and get email addresses and phone numbers of Michael S. Dell and other top exec's at Dell Computer. Email & call them, tell them your Dell computer "doesn't go beep!!!!". If that doesn't work camp out on His front lawn with a sign. I hear He has a place in Maryland, not too far from PA. Get a big sign, maybe 10 feet by 30 feet ...
Anyway don't hesitate to ask dumb questions, everybody happy to answer them ... except, of course, anyone who has bet $10,000 bucks that you can't learn a simple little thing like masm32!
p.s. If it takes u 30 years to learn it, that's fine - I still win. So take your time, no pressure, just don't ever admit you're giving up, at least until I die - then I'll never have to pay off. Thanks!
BTW MichaelW
I also get a .wav with character 7, from keyboard or from program. I was assuming 1) hutch and everyone else gets this .wav sound when using ALT 7, and might refer to it casually as a "beep"; and 2) when Nicole74 says "no beep" she means no sound of any sort. Hope these assumptions are correct or at least harmless
Quote from: rrr314159 on June 01, 2015, 02:30:48 AM... print the message to the console. Of course, it will just flash a DOS Window and disappear ...
The console program exits, and many editors do not realise that the user might want to see the output. Simple workaround is an
inkey just before the ExitProcess:
include \masm32\include\masm32rt.inc
.code
start:
print "line 1", 13, 10
print "line 2", 13, 10
inkey "line 3", 13, 10
invoke ExitProcess, 0
end start
okay...it beeped. I un-muted the speaker, but later on today I realized that there are a whole bunch of different separate things that you can mute, and I had the system sounds muted out even though the speaker was on for everything else. Grumble grumble. Well, it won't be necessary for me to camp on Mr. Dell's lawn, although that sounded like fun.
I'd be cheering that I finally got it to beep, but I'm too busy being embarrassed.
Thank you all for having the patience of saints!
well, that's actually what I suspected when good old reliable "Invoke Beep" didn't work ...
U know, Timur the Lame (Tamerlane) famous general of 1300 AD habitually left towns unconquered in the rear of his armies. He'd besiege them, keep an eye on them, and move on. Sooner or later they'd give up and he'd make a big pile of their heads to give other enemies something to think about. Anyway, that's often a good strategy, especially with stupid simple problems that for some unknown reason aren't working out. Don't beat your head against it, just move along, do the next thing - print "hello world", or attack the next country, depending what you're trying to accomplish - but keep your eye on the problem you're putting aside. Often it will go ahead and "solve itself": the town will starve and surrender, or you'll notice a youtube video isn't making any sound, and unmute it.
You can get a lot of useful assembler coding tips from history!
Hello:
At a Dos Prompt. i e Control G
C:\masm32\bin>^G
'' is not recognized as an internal or external command,
operable program or batch file.
C:\masm32\bin>
If your Keyboard has a speaker it should beep.
print "Beep",7
Should Also work, make sure you include
INCLUDE \masm32\include\masm32rt.inc
Regards herge
Quote from: herge on July 25, 2015, 11:57:46 PM
Hello:
At a Dos Prompt. i e Control G
C:\masm32\bin>^G
'' is not recognized as an internal or external command,
operable program or batch file.
C:\masm32\bin>
If your Keyboard has a speaker it should beep.
print "Beep",7
Should Also work, make sure you include
INCLUDE \masm32\include\masm32rt.inc
Regards herge
I officially haven't given up yet, I've just postponed it. Inconvenient events are going on in my life - I have to move to another apartment - so I'm postponing fun and wonderful things, like learning how to program a computer, until my worries are settled down. I swear if I ever make the computer go beep, I will be sure to inform everyone. I know it sounds strange but I'm so frazzled right now I can't even focus a drop of mental energy on the simplest of computer programs. Hmm, which smiley face looks like me right now? :icon_eek:
if none of that works, you may have a hardware issue
let us know when you come back to working on it
we can devise a list of things to check
Quote from: dedndaveyou may have a hardware issue
Quote from: nicole74, a while agookay...it beeped. ... I had the system sounds muted out even though the speaker was on for everything else.
- There's some confusion here, she did get the bleeping thing beeping a while ago. As I understand it, a voice clued her in
Quote from: nicole74...fun and wonderful things, like learning how to program a computer,...
- that line deserves to be quoted!
That's weird, I actually forgot that I successfully got it to beep. :icon_redface: I was like, "oh no, I have to do this all over again." Yes, that's right, I didn't have the sound volume on for system sounds, which was a separate setting from the main volume control, and the sudden insight was from a voice (similar to people getting an idea from a dream).
That's weird, I actually forgot that I successfully got it to beep.
- That sort of thing happens when one gets frazzled. Look on the bright side you get to feel good about it twice!
... a voice (similar to people getting an idea from a dream).
- Might be worthwhile to mention, many famous, smart people heard a "voice": Socrates, Joseph Smith, various authors. But in the old days it was called a "daemon", "angel", "muse" or similar classical reference