Are there any other radio hams on Daniweb? Statistically speaking, there are bound to be some - I'm just curious :P
73s
ZL2DBP
Are there any other radio hams on Daniweb? Statistically speaking, there are bound to be some - I'm just curious :P
73s
ZL2DBP
Granted, but all oceans part, much like The Red Sea
I wish I had a girlfriend ;)
Just throwing this out there, I'm not for or against:
Perhaps downvotes could be put on downvoting.
I very much like the new design. Clean and fresh. Nice. I like how my avatar fits nicely into the circular avatar windows better than a lot of people's, for example where the endorsements are shown at the top of a forum ^_^
Nobody is taught to use comments anymore? It is so important to comment your code in Assembly, ESPECIALLY in ancient 16bit code where functions don't have names but numbers!!
Amen
should I just remove all syntax highlighting from asm??
I second this.
We currently use Prettify
I take it there's no way to add a new language syntax with Prettify?
Hi, excuse me if this already exists, but could we have a means of syntax-highlighting code that is tailored to the forum that it's posted on, and optionally an author-specified language. I.e. on the C forum, the highlighing would be heavily tailored to highlight C code. You get the idea I'm sure.
I've noticed very marginal highlighting over on the Assembly forum which makes code harder to read - especially since certain languages (cough assembly cough) can sometimes be messy in themselves without the syntax highlighting messing things up further.
Cheers
Sounds like a partitioning problem...
I googled your error message and someone said that this solved their problem.
@mathematician, not if it made virtual registers in memory...
Right.. because your above code is an operating system in its own right, and cannot use C calls or Windows/Linux Interrupts. Now you say that you want to use Windows Interrupts... I'm confused. Are you writing an Operating System in its own right, or an application to run under Windows?
1) Add '$'s (or whatever currency symbol) in front of your prices that don't already have them
2) The green text 'Your Food. Your Way.' can be a bit hard to read - maybe add subtle text shadowing or change the parent container's background colour to ease the contrast.
3) As for deals.html, it's saying 'Not populated'. I see you've put a message explaining it, but it's not a good look for a business - perhaps temporarily remove the link on the menu bar to this page until it has content on it
4) You open your <html>
tag twice:
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
You should only have one or the other, not both
5) On the delivery page, try not to use centered text for more than single-line things like titles or slogans - it can make the reader's eye not follow the text as easily, because when they reach the end of a line, they cannot locate the beginning of the next line because it can be anywhere instead of being on the left margin. Try left align or justify
Other than that (and what mrvijayakumar has said), it looks nice. If I'm ever in Canada, I'll be sure to drop in and have a feast! :)
What work/knowledge/progress have you made so far?
Wow, that's abolutely perfect! Precisely what I was looking for. Yeah the fact that it's in C++ is absolutely fine, doesn't worry me in the slightest.
Okay, nice code - looks good. But I still don't get why you wanted to know whether low-level int
s work under Windows.. What relevance is there?
Is the code intended to run at the Application Level, or as an OS in itself?
There'll be at least the 'DOS' interrupt - int 0x21
. Why do you need interrupts on Windows if you're making an OS anyway?
I cannot use cpu interupts on windows, or can I?
Whether or not you can use CPU interrupts under Windows depends on your version of Windows. XP has a 16-bit virtual machine thingy built in to support (most) old DOS and W95 programs, IIRC.
I dont think that my newly created kernel will be able to understand invoke ConsoleA or an of those win32 api calls.
Of course your kernel won't be able to use OS-specific calls; they're part of the OS that isn't loaded when your OS is.
So what are my alternatives?
You could use CPU interrupts, write your own code to handle things that interrupts don't.
Does that answer your question? :)
For fun, I want to write my own image format. I'm going to have to draw pixels to a Window, but I haven't found any nice, simple, light librarys that can do this. I've thought about using OpenGL, but it's kind of messy and over-complicated to write code for and a lot of the time it doesn't seem to agree with me. All I need the graphics library to do is initialise a window for me, and let me feed it an X,Y and RGB so I can plot pixels.
Any suggestions?
Why don't we just give bogus code to people asking for us to do their homework? ;)
I mean, it'd really teach them a lesson when their tutor/teacher/lecturer talks to them about their code...
Discuss.
However, I am still trying to understand the way in which the compare operator works for example
cmp eax, 0
I realise this is solved, but just to clarify, with je
the order in which the operands are specified doesn't matter; both of these are valid:
cmp eax, 0
cmp 0, eax
because eax = 0
and 0 = eax
. Getting things in the right order only matters when you're dealing with >=
, <=
, >
and <
.
I get where you're coming from. There is no collision in the sense of two NICs TXing on the same lines at the same time, but there is collision in that if both NICs are TXing and neither is in RX, waiting for data, then neither of the NICs will receive any data, because they weren't in RX mode.
http://en.wikipedia.org/wiki/Ethernet_physical_layer#Twisted-pair_cable should answer a lot of your questions.
As you said, there are two for RX (RX+ and RX-) and two for TX (TX+ and TX-). Blue and brown are unused (PoE takes advantage of these). From memory, though, blue is used for ground in both PoE mode and normal mode.
I am unsure of what you mean, I don't understand how I would implement xor edx, edx. Would I place that in before of the idiv instruction, after, or am I way off?
It must be before the div
or idiv
instruction. Imagine that before you called a div
, but EDX had a value in it that was put there from a previous piece of code:
; EDX might equal, say, 0x00003EF1 because of previous code
mov eax, 0xE0F253DC
div 0x10
DIV
would divide EDX:EAX
(0x00003EF1E0F253DC) by 0x10 instead of only dividing EAX
. To fix this, you'd zero-out EDX
before doing the division, but after any instruction that modifies it. It's safest to zero it out right before it's needed to be zero, so in this case, right before your div
. With EDX
zeroed-out, div
would be dividing by 0x00000000E0F253DC
, which is what we wanted in that example.
Also what about 64 bit stuff?... I'm just curious how that would work because I understand 8/16/32 bit division (conceptually ... obviously not practically) about what you said, however; how does 64 bit work?
64-bit stuff... That's a good question. I don't have a 64-bit system but I'm damned sure it'd divide the 128-bit value RDX:RAX
by your operand.
In the division section of the code, I am still trying to grasp the basic concept of why this actually works, I understand the whole thing about working with different bit registers, however; why do I have …
@britanicpie you're suposed to answer the previous question and provide the next poster with a question to answer.
Favourite operating system?
Computing ;D
Favourite magazine (keep it appropriate, guys >.>)
A div
always involves two registers, but these registers depend on the size of your operand:
DIV BL
divides AX
by BL
DIV BX
divides DX:AX
by BX
DIV EBX
divides EDX:EAX
by EBX
As you can see, an 8-bit operand divides AX
, a 16-bit operand divides DX:AX
and a 32-bit operand divides EDX:EAX
. (Please note the the semicolon merely means concatenation, not a segment:offset pair).
So in your case, your operand size is 32 bits wide, so it'll be dividing EDX:EAX
by [user_input_2]
. Who knows what bogus/rubbish value might be in EDX
, so it is good practice to zero-it out:
xor edx, edx
Hope this helps.
Why in binary addition, does 1 + 1 equal 0 with a carry and not 1 with a carry?
1
+ 1
-----
10
When we add 1 and 1 in binary, we encounter and overflow situation which is just fancy shmancy talk for needing to have more digits to represent any larger values. It's a bit like adding 1 and 9 in decimal: we have to overflow into the tens column, thus giving the result of 10
. Our result is 0 and we have to carry the one.
The same principle applies in binary, except that we don't count up to 9 and then overflow into the 10s column. Instead, we overflow into the twos column, then after we've reached 11, we overflow into the 4s column and so on.
So 1 + 1 = carry & 1
simply because 1 + 1 = 10
. Does that explain it? :)
In pseudo code terms, what you're doing is:
EAX = 4
EBX = 1
ECX = Location of string 1
ECX = Location of string 2
EDX = Length of string 1
EDX = Length of string 2
SYSTEM CALL
So you're setting ECX
and EDX
to certain values, then overwriting them with other values. This means that when int 0x80
is invoked, ECX
points to the location of string2
and EDX
points to the length of string2
. You need a separate system call for each individual string you'll be printing.
Please also note that you've defined the length of string1 as being 12. This means that when you print it, it'll print the characters "Howdy Folks!" but not the 0Ah
which follows. 0Ah
is the charcter to print a new line on Linux/UNIX. You've also made the same mistake with string2
.
Also, are my comments appropriate with how the line actually functions?
Your comments look pretty much fine, with the exception of the following line
mov ecx, string ;creates address for my string variable
It doesn't create the address as such, it just moves the address that string
represents into ECX
. When you assemble your code, the assembler works out the memory address that the labels in your program (start
, string
, string2
, etc.) will end up at when it runs. It then replaces any occurence of this label with that address. So with the above line of code, it moves the address of your string …
No, that is a commmon misconception.
You are very much right in your post, AHarrisGsy; while Linux isn't free of malware, it should be noted that the amount of malware, viruses etc. for Linux is absolutely miniscule compared to the number for other operating systems such as Windows.
But you are stll right in saying what you did.
You guys are missing one key element of the OP's question:
sudo chown -R .
He has changed the ownership properties. Thus he should try chaning the ownerhip to match whichever user:group combination is attempting to access them when he runs into his problem.
The service pack updates don't help. Unavoidable "crap" that you need to install into Windows that does slow it down.
That's quite true. I've got Windows XP with no updates or service packs installed on a VM (just as a testing environment for the occasional Windows program I write), and it runs quite smoothly. I have access to a physical machine with a Windows that's all up-to-date and over the installation's life, it's gotten slower and slower, with more and more memory used after a fresh boot, as updates and service packs were installed.
That's one of the main areas that Microsoft has let itself down. Updates and patches should be to not only fix bugs, but also update the existing software to speed it up.
If you want to be sure the sun has died before your encryption can be broken, that's just a few bits more.
There's always a chance their first attempt will be correct. It's small, but it's always there, so you can't quite be 100% sure that the sun will have died.
MemTest86 is a live testing program, what this means is that it runs directly on the flash drive or CD that it is installed on. It is essentially an operating system, that doesn't get installed onto the computer itself.
That's correct but can he boot from any media at all, including USB flash memory?
EDIT: Never mind, he said that the changed the OS.
assembly language depends ENTIRELY upon the target processor
Should have given some sample code in a really rare, obscure dialect just for fun ;)
similar to IBMs statement around that time that "there will never be a need for more than 5 computers in the world" :)
Yeah, there's that one too :)
I think apple because it is really fast and doesn't slow down after 3 years.
Mac OS (much like all OSes) does have its strong points, but a lot of machines running other OSes haven't slowed down too, you know ;) And while it may not relate directly to the OS, Apple have a tendency to try and get people to buy their hardware, for example, it's difficult to impossible to develop an iOS app without a Mac. But from experience, it's more stable than Windows.
It depends on what you're doing as to which size (*sb, *sw, *sd, etc) you use.
And yes, those are all correct.
Hang on, your disassembly shows:
21: callq 26 <_start+0x26>
26: movabs $0x1,%rax
30: movabs $0x0,%rbx
3a: cd 80 int $0x80
So isn't the code at 0x21 just calling the next instruction, instead of fgets? Correct me if I'm wrong.
Another reason bugs can arise is that code gets a bit untidy and hard to follow. For your benifit, I'd suggest looking up about the rep, lodsb, stosb and loop instructions. You'll probably find these quite useful
Using rep
and stosb
in your purge functions can simplify and condense it down to:
mov rdi, sint ; destination index = string
mov rcx, 21 ; we're going to repeat 21 times
xor al, al ; zero-out al
rep stosb ; Repeat stosb RCX (21) times
So the next thing I'd do is go through my code and try to condense it into as little as possible, so that when you're trying to debug, it's a lot easier.
I started studyning it about 12 hours before I posted this
Wow, that's quite good progress!
Then there's the issue with holding the steering wheel ;) No, I'm just poking a bit of fun.
My first girlfriend is my first girlfriend's best friend.
Reminds me a bit of "this statement is false"... or was she just lonely? Or did you date two girls who were best friends with each other?
I prefer to stick to C when I can, but some things are best done in C++ rather than C. I tend to C++ when I'm dealing with virutal yet tangeable objects (if that makes sense). For example when dealing numerous objects like balls, blocks etc. in a simulation, I use C++, but I'm not so worried about OOP or no OOP when it comes to things that, for example, might be socket.connect();
instead of socket_connect(socket);
I found some really good tutorials in the form of some old text files that an Australian by the name of Adam Hyde (see my signature) wrote back in 1995 and 1996. I picked those up in 2010 I think... can't seem to be able to find them...
To make something that looks like a progress bar, you'd just need some sort of outer container, such as a <div>
tag with its width set to, say, 400px, for exmaple. Inside this, you'd have another <div>
with a background colour different to its parent, and with a width of 66%;