assembly

Can someone explain the following load and store instructions as part of the ARM ISA?

↘锁芯ラ 提交于 2021-02-06 06:33:08
问题 I'm just starting to learn ARM and I'm having trouble understanding what the load and store instructions do exactly. Load instructions: ldrsb ldrb ldrsh ldrh ldr Store instructions: strb strh str What does it mean to "load halfword" signed or unsigned? Or to "load byte" signed or unsigned? What is the difference between signed and unsigned, and in what particular applications would some of the load/store instructions be practical to use? All in all, I'm looking for an intuitive understanding

Can someone explain the following load and store instructions as part of the ARM ISA?

梦想的初衷 提交于 2021-02-06 06:31:31
问题 I'm just starting to learn ARM and I'm having trouble understanding what the load and store instructions do exactly. Load instructions: ldrsb ldrb ldrsh ldrh ldr Store instructions: strb strh str What does it mean to "load halfword" signed or unsigned? Or to "load byte" signed or unsigned? What is the difference between signed and unsigned, and in what particular applications would some of the load/store instructions be practical to use? All in all, I'm looking for an intuitive understanding

Can someone explain the following load and store instructions as part of the ARM ISA?

白昼怎懂夜的黑 提交于 2021-02-06 06:29:50
问题 I'm just starting to learn ARM and I'm having trouble understanding what the load and store instructions do exactly. Load instructions: ldrsb ldrb ldrsh ldrh ldr Store instructions: strb strh str What does it mean to "load halfword" signed or unsigned? Or to "load byte" signed or unsigned? What is the difference between signed and unsigned, and in what particular applications would some of the load/store instructions be practical to use? All in all, I'm looking for an intuitive understanding

How to draw a pixel on the screen in protected mode in x86 assembly?

旧城冷巷雨未停 提交于 2021-02-05 18:54:17
问题 I am creating a little bootloader+kernel and till now I managed to read disk, load second sector, load GDT, open A20 and enable pmode. I jumped to the 32-bits function that show me a character on the screen, using the video memory for textual content (0x000B0000 - 0x000B7777) pusha mov edi, 0xB8000 mov bl, '.' mov dl, bl mov dh, 63 mov word [edi], dx popa Now, I would like to go a little further and draw a single pixel on the screen. As I read on some website, if I want to use the graphics

How to draw a pixel on the screen in protected mode in x86 assembly?

强颜欢笑 提交于 2021-02-05 18:54:12
问题 I am creating a little bootloader+kernel and till now I managed to read disk, load second sector, load GDT, open A20 and enable pmode. I jumped to the 32-bits function that show me a character on the screen, using the video memory for textual content (0x000B0000 - 0x000B7777) pusha mov edi, 0xB8000 mov bl, '.' mov dl, bl mov dh, 63 mov word [edi], dx popa Now, I would like to go a little further and draw a single pixel on the screen. As I read on some website, if I want to use the graphics

How to draw a pixel on the screen in protected mode in x86 assembly?

南楼画角 提交于 2021-02-05 18:53:34
问题 I am creating a little bootloader+kernel and till now I managed to read disk, load second sector, load GDT, open A20 and enable pmode. I jumped to the 32-bits function that show me a character on the screen, using the video memory for textual content (0x000B0000 - 0x000B7777) pusha mov edi, 0xB8000 mov bl, '.' mov dl, bl mov dh, 63 mov word [edi], dx popa Now, I would like to go a little further and draw a single pixel on the screen. As I read on some website, if I want to use the graphics

multiply two consecutive times in assembly language program

允我心安 提交于 2021-02-05 12:32:50
问题 I am using 8086 emulator and DOSBOX and MASM. I know that when we multiply 8-bit with 8-bit, answer will be of 16-bit. al*(8-bit)=ax And when we multiply 16-bit with 16-bit,answer will of 32-bit. ax*(16-bit)=dx & ax But if the answer is in (dx & ax) and I want to multiply 8-bit or 16-bit number then it will simply perform with ax But I needed to multiply a number with answer in (dx & ax) . So how to overcome this problem? I need solve this situation for the factorial program. Where I am

Function works with buffers on the stack but not in .data or .bss sections? [duplicate]

折月煮酒 提交于 2021-02-05 12:21:04
问题 This question already has an answer here : Why can't I make a char array longer than 61 characters in C? [duplicate] (1 answer) Closed 10 months ago . I have the following code: global _start extern GetStdHandle, WriteConsoleA ;kernel32.dll section .data: buf times 12 db 0 section .text: _uint32_to_string: ;void uint32_to_string(uint32_t n, char* buffer) ;buffer: 11 bytes (minimum) push ebp push ebx push esi push edi mov ebp, esp mov ebx, [ebp + 24] xor edi, edi mov eax, [ebp + 20] mov ecx,

Converting decimal to binary in assembler

好久不见. 提交于 2021-02-05 12:17:25
问题 I need help with my first program in assembler. I have to convert values entered by user from decimal to binary. I have no idea how can I show values as a decimal, and what should I do next. could anyone instruct me step by step what do next. .model small .stack 100h` .data txt1 db "Enter binary value:" ,10,13, "$" txt2 db "BIN: " ,10,13, "$" .code main proc mov ax, @data mov ds, ax ;clear screen mov ah,0fh int 10h mov ah,0 int 10h ;show first text mov ah, 9 mov dx, offset txt1 int 21h call

Converting decimal to binary in assembler

不打扰是莪最后的温柔 提交于 2021-02-05 12:16:31
问题 I need help with my first program in assembler. I have to convert values entered by user from decimal to binary. I have no idea how can I show values as a decimal, and what should I do next. could anyone instruct me step by step what do next. .model small .stack 100h` .data txt1 db "Enter binary value:" ,10,13, "$" txt2 db "BIN: " ,10,13, "$" .code main proc mov ax, @data mov ds, ax ;clear screen mov ah,0fh int 10h mov ah,0 int 10h ;show first text mov ah, 9 mov dx, offset txt1 int 21h call