- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
45 Posted Topics
Re: I don't see what you are trying to do? Which variable do you want to print the value of.. ? Try this out, and respond with your results. [CODE] mov al,VARIABLENAME storage db 0, "$" mov [storage],al mov ah,9 mov dx,storage int 21h[/CODE] That uses DOS vector 21h ("$" = … | |
Re: I have not coded .asm for almost 8 months... but what the hell. Take a look at my stuff and tell me if you want any of it. youtube.com/Goalatio | |
When I was making my most recent youtube video, I tried to do the following to define a string of bytes.. [CODE]main: jmp .game win_msg db "You win!",0 .game:[/CODE] but was greeted with compile errors saying that the label '.game' did not exist... I KNOW that it's possible to do … ![]() | |
This is my OS that I've been working on for almost 3 months now (not all at once.. in periods of a few days each time). Would anyone skilled in NASM mind looking at parts of it and give me their opinion on my code? Note that there are many … | |
Re: [URL="http://webster.cs.ucr.edu/AoA/Windows/HTML/ISA.html"]Does this help?[/URL] | |
Re: [CODE][COLOR="Green"][org 0x0100] ;required for .COM files[/COLOR] [COLOR="Green"][section .text] ;Think of this as a code section[/COLOR] menuinput: mov ax,03 ;Clear screen code int 10h ;Run the clearing mov ah, 09 [COLOR="Green"]mov dx,Line1 ;dont need offset[/COLOR] int 21h exit: mov ah, 4Ch [COLOR="Green"]xor al,al ;same as mov al,00 --but faster[/COLOR] int 21h … | |
Re: .COM files still work on windows 7, they are emulated by NTVDM. A virtual PC would be a much better option though.. NTVDM can be very slow. | |
I wrote an operating system in 16bit asm (NASM), and thought it was easy. Then I came up with the crazy idea that I could learn 32bit asm.. And quickly became disgusted. All of the 32bit tutorials out there TELL you to use C or a similar language; I want … | |
Re: Of course it's possible.. and easy. But I think you're confused between what "MACHINE" code and assembly language is. Assembly language is the closest you'll be getting to programming binary these days. | |
Re: I hope you mean [URL="http://en.wikipedia.org/wiki/Microprocessor"]microprocessor[/URL]... | |
I've run into a bit of a problem with my OS.. Displaying large amounts of information; like so- [CODE]mazemsg db 0x70,"Maze game: How to play--",0 db 0x74,"-Arrow keys for movement",0 db 0x7C,"-Move into the red crates to move them",0 db 0x7E,"-Push a crate onto yellow dots to clear both the … | |
I would like to know, because I noticed how slow it can be when called over and over. How would I go about doing [CODE]xor ah,ah int 0x16[/CODE] Without the interrupt? [URL="http://www.youtube.com/watch?v=ZKFY0OivbwE"]Here's a link to my video.. can see small delays keys are pressed quickly or held in near the … | |
Re: use a CALL instruction, it pushes down the current position into the stack [CODE]000001: START CODE.... 000002: CALL 000030; END OF CODE 000003: CONTINUE CODE.... 000030: test ecx, ecx 000030: ret ;Pop position off the stack and return to caller[/CODE] | |
Re: Yes, and remember that [myVar] is just a reference to its memory address, a trick of NASM you could say. Lets say that the memory address is 0x1234 mov al,ds:[myVar] is really mov al,[ds:0x1234] and.. mov al,[ds:myVar+bp] lets say BP = 3, the code looks like this mov al,[ds:0x1234+3] = … | |
Re: some NASM code I wrote for you.. tested on intel processor much faster than int 21h. [CODE] jmp main test1 db "%2",0 main: mov ax,0xB800 ;video memory unless in graphics mode push es mov es,ax mov si,test1 mov ah,0x07 ;colors xor bx,bx ;use bx to position the output.. .write: mov … | |
Re: Your question makes no sense, please elaborate your question a bit more clearly. Also, which processor and assembler are you using? | |
Re: It's all out there, I got mine working on a very simple level after just a few days of googling/researching bootloaders and floppy sectors etc. [QUOTE]I try too much to search on google but I did not get any help for me.[/QUOTE] Might sound a bit harsh, but I think … | |
Re: [QUOTE=Kieran Y5;1405363]Hello, - A virtual PC thing (I use Oracle VirtualBox) [/QUOTE] Don't use virtualbox, virtualbox does a few 'things' to give the illusion that your program works, when in reality, if you boot from it, it will not. I recommend Microsoft Virtual PC 2007. | |
Re: Use of the SI register and the LODSB command would be a great place to start. By letter, I assume you already know the letter that you are looking for? I wrote a small sample for you in NASM, it uses the letter L as the letter to search for. … | |
Re: [QUOTE=amateur¬;1398453]haha, anytime^^ assembly's so tedious and such a useless thing to learn which i doubt would be needed by me in the future. i've re-done everything myself though and it works! "learn from your mistakes" they say ;)[/QUOTE] Assembly is not tedious, and certainly is useful to learn... A lot … | |
Re: Or you could do [code] mov cx,5 ;Compare first 5 bytes mov di,string1 mov si,string2 cld repe cmpsb je location1 ;If strings are 100% equal, go to this location[/code] Much easier, much more efficient.. repe = repeat while equal, so you don't have to worry about it slowing down because … | |
Re: [CODE]mov al,'$' int 0x29[/CODE] That should do it. :) | |
Re: Not sure how CDs work, but if it was a floppy you would just jump to the next sector. Maybe CDs have something similar? Good luck, sounds like an interesting project. [URL="How CDs work"]http://www.ehow.com/how-does_4896772_cds-work.html[/URL] | |
Over the past few days I have been writing a bootloader/kernel in NASM... It loads perfectly fine when I write it to a virtual floppy using PARTCOPY, and then boot to it from Oracle VM VirtualBox. However, when I write it to a physical floppy and try to boot to … | |
Re: [CODE]xor ah,ah mov al,0x13 int 0x10[/CODE] Graphic mode? | |
| |
Re: Made this for you quick... Is this what you wanted? Compile it, then pass the integer to it as an argument. Example: TEST 31 Test being the name of the file, 31 being the argument. The program will display "1" as 31 is "1"'s value [CODE][org 0100h] [section .text] mov … | |
Re: Well, it's hard to help you fix an error when you don't tell us what the error is . . . | |
Hello everyone, I've spent most of today working on a 16-bit interactive interface, and thought it'd be nice to share it with you all. :) Notes: Assembled with NASM16 Has only been tested on Windows XP and Windows 7 There is A LOT of code that needs to be posted … | |
Re: [CODE] this.WindowState = FormWindowState.Minimized;[/CODE] Thanks, just browsing through.. But this solved my problem as well. | |
Re: Notnull pretty much covered it, but made this for you quick. [CODE][org 0100h] [section .text] main: mov cx,our_message_l ;Load amount of chars to print in CX dec cx dec cx dec cx ;Lower cx by 3 as not to display "13, 10, "$"" on the colored line. mov bl,[color] ;Load … | |
Re: We cannot help you unless you tell us which assembler and OS you are using.. Why should we take the time to help if you don't give a good description of your problem? By NASM16 standards, ALL of your code would flag an error. If you are compiling this to … | |
Re: To take a multi-digit number, you have to write your own string input routine, it does not take a great deal of time. To create a 'buffer' to store each character STORAGE times 50 db 0 Allows for up to 50 inputted characters. To access each position in the buffer, … | |
Compile this with NASM16 (Must be compiled in .COM format!) It will display all 256 colors usable by the BIOS in a neat rectangle that contains 16 columns, 17 rows (Just counted, it may be different). KNOWN BUGS: If you enter FULLSCREEN or run this program from a DOS operating … | |
Re: Easy! Say you keep your original values in your array (Still stored in the places that you chose) [CODE]Array1 times 6 db 0[/CODE] Position 0 would hold your value 5H Position 1 would hold 8H And so on, to display this array, [CODE]mov byte [Array1 + 5], '$' mov ah,9 … | |
Hey again everyone, it's been a while since I've posted here.. What I'm trying to do, is get the command-line argument and convert it to hexidecimal. Example, if the file is named 'test', you would call it with test 72 Or something similar. I have it working, but after MUCH … | |
Hey guys, I am on the Windows OS using NASM16, and I'd like to know how to set the system time.. Code so far: [CODE][org 0100h] ;COM format %include "Lib_1\Lib1.asm" ;settime Hour minute second date month year ;settime "6" "35" "00" "06" "01" "09" ;-------------------- ;Lib1.asm ;string - Displays a … | |
Re: I see that you are using [org 0100h], that is a .COM file.. you cannot use a linker on it! From the looks of it, you are trying to display "This is a message." Give this a shot.. if you are using NASM16, assembly it with this nasm16 text.asm -o … | |
Hey all, I've been trying to get my int 10h to set the color for a STRING, not just a single character. Here's my code, i'm running windows XP and using NASM16 assembler. So, what I want it to do is display something like "Hello world", instead of just.. "a", … | |
So, I was trying to re-create the CMD command "set /p", where it prompts the user to type text, and is ended by a carriage return. Upon trying this, however, I found that a word (dw) will only hold the last thing passed to it. You can type "abcdefg", but … | |
Hey all, I've been working on this little program in NASM 16 bit assembly, under a windows operating system. It works, I just have a problem. If you don't pass it any arguments, it fails to see that there is an end of line character. You pass arguments as.. INKEY … | |
Hello everyone.. I have used this site off and on and have recently decided to join. I am interested in programming and 3d graphics. My main focuses in programming are: NASM\MASM assembly Ruby Batch Also, not sure if I am allowed to say this here (Might be considered advertising). I … | |
Would anyone know how to get command-line arguments in NASM16? I am on a Windows XP. I have tried a great deal of things and spent much time searching for an answer to this. What I ment by command line arguments, something simple like this would be enough. Filename: Hello1 … | |
Re: Not sure if this is what you were looking for, but here is one of the projects I recently wrote. It's fairly long. [CODE] [BITS 16] ;Set code generation to 16 bit mode [ORG 0100h] ;Set code start address to 0100h [SEGMENT .text] ;Main code segment start: mov dx,main ;Display … | |
Re: I had this problem at one point too. Try this out. mov ah,08 ;Keyboard input function int 21h ;Call DOS cmp al,HEX_VALUE_OF_KEY je near WHERE_TO_JUMP using "near" for your jump removed the chance of getting "Short jump out of range" This is windows, not sure on linux.. Never hurts to … |
The End.