Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Programming with NASM / Re: What exactly is the structure of an LDT entry?
« Last post by ben321 on February 17, 2023, 09:53:08 PM »
In 3.4.5.1 it is clear that:
Code: [Select]
Execution cannot be transferred by a call or a jump to a less-privileged (numerically higher
privilege level) code segment, regardless of whether the target segment is a conforming or
nonconforming code segment. Attempting such an execution transfer will result in a general-
protection exception.[/quote]

That's strange. Ring0 code can't far-jump or far-call to a Ring3 code segment. So how does an OS run an application then? An OS is running at Ring0, and is responsible for starting applications. Yet applications run in Ring3.
72
Programming with NASM / Re: Need Help
« Last post by debs3759 on February 17, 2023, 09:07:58 PM »
Please post what you have tried already, so we're not just doing your homework for you.
73
Programming with NASM / Re: What exactly is the structure of an LDT entry?
« Last post by ben321 on February 17, 2023, 09:00:37 PM »
Which page is this?
It's not from any page. If you read my post, you would see I was basically taking notes from what I was reading in the manual. I was (for my own use) writing a summary of what I was reading in the manual, in order to provide myself a much smaller reference than the manual, while still providing usable info for my programming. My summary obviously doesn't contain exact quotes from the manual.

I was just writing about it here to make sure my understanding of what the manual was saying was in fact correct. I didn't want to write down summary info for myself, if my summary was based on any misunderstanding of what the manual was saying. I didn't want to write down or commit to memory, any misunderstandings of what was in the manual, because that would result in me writing buggy software.
74
Programming with NASM / Re: What exactly is the structure of an LDT entry?
« Last post by fredericopissarra on February 17, 2023, 11:45:56 AM »
Quote
If a code segment is conforming, it means that code from a lower privilege segment (higher DPL number) can far-jump into that higher privilege segment (lower DPL number).
If a code segment is not conforming, it means that only code from a segment that has the same privilege level (same DPL number) can far-jump into it.
In no case can code in a segment with higher privilege (such as kernel code) far-jump into a segment with lower privilege (such as an application).
Which page is this? In 3.4.5.1 it is clear that:
Code: [Select]
Execution cannot be transferred by a call or a jump to a less-privileged (numerically higher
privilege level) code segment, regardless of whether the target segment is a conforming or
nonconforming code segment. Attempting such an execution transfer will result in a general-
protection exception.[/quote]
75
Programming with NASM / Need Help
« Last post by Franciswalser on February 17, 2023, 11:12:15 AM »
I want to do the following, let's say we have a string called A and it contains 'echo Hello, World!' I want to do this: reverse A, now it is '!dlrow ,elloH ohce' remove the last 5 chars, so it is '!dlrow, elloH' reverse A, so it is 'Hello, World!' and output A, because the user inputted A in the first place in a, it is for a command prompt, so that is why the echo is there. I can do the reversing, but I can't seem to figure out how to remove the last 5 chars from the string.. does anyone know how to do this? It is bare bones (no int21h) and Bits 16. my account access
76
Programming with NASM / Re: What exactly is the structure of an LDT entry?
« Last post by ben321 on February 17, 2023, 09:45:37 AM »
Intel Software Developement Manuals, volume 3.

I'm trying to write down the most useful info from that manual regarding segments and the GDT and LDT, into a nice HTML file that summarizes this info in a way I can understand it and use it for actually programming something. Below are 3 statements I've written about conforming and non-conforming code sections, based on my understanding of what I read in the manual. Can you tell me if I got any of this incorrect? I don't want to write down bad info.
Quote
If a code segment is conforming, it means that code from a lower privilege segment (higher DPL number) can far-jump into that higher privilege segment (lower DPL number).
If a code segment is not conforming, it means that only code from a segment that has the same privilege level (same DPL number) can far-jump into it.
In no case can code in a segment with higher privilege (such as kernel code) far-jump into a segment with lower privilege (such as an application).

I'm questioning if this is accurate because something seems off about it. I mean the operating system (kernel level) is in fact responsible for starting applications (user-mode level). That's what happens when you double-click on an EXE file. The OS runs your application. So I think I need some clarification about what conforming code means, because I think I may have misinterpreted what the Intel manual says.
78
Programming with NASM / Re: Any help anyone could give would be quite nice
« Last post by Frank Kotler on February 15, 2023, 02:06:40 PM »
Specific problems might help us help you.

What did you do?
What did you expect?
What happened?

Best,
Frank

79
Programming with NASM / Any help anyone could give would be quite nice
« Last post by Daniellebishop on February 15, 2023, 11:12:43 AM »
Hello,

I was looking into places where I could possibly find help for my programming. I didn't find anything really on google except for here so I'm hoping that there is some place off in the corner of the web... right now I am trying to learn new things with SDL but it's being quite mean to me and I don't really know why... Any help anyone could give would be quite nice. My Nordstrom Account


Any Help Will be Appreciated
80
Programming with NASM / What exactly is the structure of an LDT entry?
« Last post by ben321 on February 15, 2023, 11:00:19 AM »
I know what GDT entries look like as they can be seen here https://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/SegmentDescriptor.svg/1024px-SegmentDescriptor.svg.png (though the byte order needs to be swapped for actual usage, going from bottom right on that diagram to upper left, as x86 is a little-endian CPU). What I don't know though is what is the structure of an LDT entry. I know that I need to allocate memory for the LDT in the GDT, and then use the LLDT instruction to tell the CPU which GDT entry points to the memory used by the LDT. But I don't know the actual structure of the LDT entries. If anybody has a good diagram for that, please post it here. Thanks in advance.
Pages: 1 ... 6 7 [8] 9 10