Sponsored Content
Top Forums Programming Ok i have a small assembly question Post 302637171 by shamrock on Tuesday 8th of May 2012 12:20:35 PM
Old 05-08-2012
The $ sign is the end of string marker and tells the DOS print routine when to stop...that is the reason why you hear bells and whistles or see funky characters on your screen as the DOS print routine is trying its best to make sense of the extended ascii character set which it cant handle...to prevent this from happening change the code so that the user supplied input is concatenated with a $ sign...this way the user doesnt have to type it and clears out all the other issues.
This User Gave Thanks to shamrock For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

small question

Hi there, I found the following script on the net, i like to use it as a standard template for new scripts. But i do not understand the meaning of the last line, can anybody explain what going on on the last line vflag=off filename= while getopts vf: opt do case "$opt" in v)... (9 Replies)
Discussion started by: janr
9 Replies

2. Shell Programming and Scripting

small question of echo | grep command

Hi, i've got the following: a=`echo $b | grep '^.*/'` i'm storing in the variable the value of the variable b only if it has a / somewhere. It works, but i don't want to print the value. How do i give the value of b to the grep command without the echo? thanks! (5 Replies)
Discussion started by: kfad
5 Replies

3. Shell Programming and Scripting

small question regarding substr()

Hello.. I am doing some awk-ing and among all I use substr inside it.. I have: ....substr($0,60,37) meaning as U all know take from 37 char. from point 60.. can I put it like this substr($0,60,end of line) meaning take it from point 60 and take all characketrs in that line until line... (2 Replies)
Discussion started by: amon
2 Replies

4. Shell Programming and Scripting

A small minix question

First af all hi. i want to create a batch script which inform when users log in last time on system or if they are online when they logged in. I want ot use a file .users which has the usernames of users. i want to print for example peter is ONLINE: Logged in on Wed Feb 11 07:47 alex... (2 Replies)
Discussion started by: sasa
2 Replies

5. UNIX for Dummies Questions & Answers

Small question regarding SSH

I am looking for some model like this: My Computer ------------- Intermediate Server (IS) ------------- Own Server I must be able to ssh into the Intermediate Internet Server which is generally an online version of SSH service through which I will connect to Own Server. I was the IS to... (2 Replies)
Discussion started by: Legend986
2 Replies

6. Programming

A small question about file descriptor

Can any body tell me when I put close(2), why the code does not show any out put? #include <stdio.h> #include <fcntl.h> #include <errno.h> int main(){ int fd1,fd2,fd3,fd4; close(2); fd1=open("test1.txt",O_WRONLY |O_CREAT | O_TRUNC,0744); fprintf(stderr,"fd1 = %d\n",fd1); ... (5 Replies)
Discussion started by: mlhazan
5 Replies

7. Programming

A small question about fork()

Hello experts, I am using fork() in my code but I am confused which output comes first child or parent? I did the following code .My book shows parent first but my linux shows child first.Can anyone tell me why? #include <stdio.h> int main(){ int pid; printf("I am original process with pid... (5 Replies)
Discussion started by: mlhazan
5 Replies

8. Shell Programming and Scripting

Small fast question

just to confirm du from sh show sizes as multiples of 512 byte right? (4 Replies)
Discussion started by: Nick1097
4 Replies

9. Programming

vga assembly question

Im trying to make a vga program for linux Im wondering if anyone knows of a simple document on the subject or if someone could show me some basics. What system calls should I use what parameters should I give them. How do I draw a line of pixels green after in vga mode. I prefer nasm but I can use... (2 Replies)
Discussion started by: Errigour
2 Replies

10. Homework & Coursework Questions

Sparc Assembly

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am having a hard time with this assignement i cant get the pfib value to print out the fib sequence. ... (1 Reply)
Discussion started by: kenjiro310
1 Replies
gasp(1) 						       GNU Development Tools							   gasp(1)

NAME
gasp - a preprocessor for assembly programs SYNOPSIS
gasp [-a|--alternate] [-c CHAR | --commentchar CHAR] [-d|--debug] [-h|--help] [-M|--mri] [-o OUTFILE | --output OUTFILE] [-p|--print] [-s|--copysource] [-u|--unreasonable] [-v|--version] INFILE ... DESCRIPTION
The primary purpose of the GNU assembler is to assemble the output of other programs--notably compilers. When you have to hand-code spe- cialized routines in assembly, that means the GNU assembler is an unfriendly processor: it has no directives for macros, conditionals, or many other conveniences that you might expect. In some cases you can simply use the C preprocessor, or a generalized preprocessor like M4; but this can be awkward, since none of these things are designed with assembly in mind. gasp fills this need. It is expressly designed to provide the facilities you need with hand-coded assembly code. Implementing it as a preprocessor, rather than part of the assembler, allows the maximum flexibility: you can use it with hand-coded assembly, without paying a penalty of added complexity in the assembler you use for compiler output. INFILE... are the files to be preprocessed. OPTIONS
The simplest way to use GASP is to run it as a filter and assemble its output. In Unix and its ilk, you can do this, for example: $ gasp prog.asm | as -o prog.o Naturally, there are also a few command-line options to allow you to request variations on this basic theme. Here is the full set of pos- sibilities for the GASP command line. -a --alternate Use alternative macro syntax. *Note Alternate macro syntax: Alternate, for a discussion of how this syntax differs from the default GASP syntax. -c CHAR --commentchar CHAR Use CHAR as the comment character. The default comment character is `!'. For example, to use a semicolon as the comment character, specify `-c ';'' on the GASP command line. Since assembler command characters often have special significance to command shells, it is a good idea to quote or escape CHAR when you specify a comment character. For the sake of simplicity, all examples in this manual use the default comment character `!'. -d --debug Show debugging statistics. In this version of GASP, this option produces statistics about the string buffers that GASP allocates internally. For each defined buffersize S, GASP shows the number of strings N that it allocated, with a line like this: strings size S : N GASP displays these statistics on the standard error stream, when done preprocessing. -h --help Display a summary of the GASP command line options. -M --mri Use MRI compatibility mode. Using this option causes GASP to accept the syntax and pseudo-ops used by the Microtec Research `ASM68K' assembler. -o OUTFILE --output OUTFILE `-o OUTFILE' `--output OUTFILE' Write the output in a file called OUTFILE. If you do not use the `-o' option, GASP writes its out- put on the standard output stream. -p --print Print line numbers. GASP obeys this option _only_ if you also specify `-s' to copy source lines to its output. With `-s -p', GASP displays the line number of each source line copied (immediately after the comment character at the beginning of the line). -s --copysource Copy the source lines to the output file. Use this option to see the effect of each preprocessor line on the GASP output. GASP places a comment character (`!' by default) at the beginning of each source line it copies, so that you can use this option and still assemble the result. -u --unreasonable Bypass "unreasonable expansion" limit. Since you can define GASP macros inside other macro definitions, the preprocessor normally includes a sanity check. If your program requires more than 1,000 nested expansions, GASP normally exits with an error message. Use this option to turn off this check, allowing unlimited nested expansions. -v --version Display the GASP version number. INFILE ... The input file names. You must specify at least one input file; if you specify more, GASP preprocesses them all, concatenating the output in the order you list the INFILE arguments. Mark the end of each input file with the preprocessor command `.END'. SEE ALSO
`gasp' entry in info; The GNU Binary Utilities, Roland H. Pesch (October 1991); gasp(1). Debian September 1999 gasp(1)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy