mov

x86 Assembly MOV instruction - Register to Register and Memory to Memory

╄→гoц情女王★ 提交于 2020-01-25 04:00:09
问题 It's known that the MOV instruction allows register to register moves while memory to memory moves are not possible. Why is this? I've read here that memory to memory moves are disallowed because it complicates the CPU and that RAM has to be in either a read mode or write mode with any given instruction. Is anyone able to expand on this? Why does RAM have to be in either read mode and write mode? How is it possible to read and write from registers but not from RAM within a single instruction?

Assembly instruction mov register,[register][register]

隐身守侯 提交于 2020-01-24 15:08:25
问题 I'm studying ASM 8086 theoretically on highschool (MASM, x86). .data var dd 421,422, 443, 442, 444, 217, 432 .code ; some code mov esi, (OFFSET var)+4 mov ebx, 4 mov edx, [ebx][esi] ; that's the line I don't uderstand I ran that program and after that EDX == 000001BBh == 443 What's the meaning of last line in that code? What does it do? 回答1: esi points 4 bytes after var, which is 422 . ebx is 4. [ebx][esi] is something which denotes [ebx+esi] and the [] is a pointer operator. All this

Assembly instruction mov register,[register][register]

心不动则不痛 提交于 2020-01-24 15:07:06
问题 I'm studying ASM 8086 theoretically on highschool (MASM, x86). .data var dd 421,422, 443, 442, 444, 217, 432 .code ; some code mov esi, (OFFSET var)+4 mov ebx, 4 mov edx, [ebx][esi] ; that's the line I don't uderstand I ran that program and after that EDX == 000001BBh == 443 What's the meaning of last line in that code? What does it do? 回答1: esi points 4 bytes after var, which is 422 . ebx is 4. [ebx][esi] is something which denotes [ebx+esi] and the [] is a pointer operator. All this

MPMoviePlayerController does not work with movie in documents folder

醉酒当歌 提交于 2020-01-01 03:47:25
问题 I have a ViewController which plays a movie. If the movie was downloaded (with ASI-HTTP-Request) it takes the local version. Otherwise it streams it from the web. It's the exact same movie. Streaming does work very well, but playing the local file does not work. Just a black screen and no controls. The file has been downloaded correctly I checked the md5 checksum. It's a Apple QuickTime Video (.mov) at a size of 1024x5xx pixel. player = [[MPMoviePlayerController alloc] init]; [player.view

avformat_write_header return error code when trying to write PCMU encoded frame into avi/mov file

我的梦境 提交于 2019-12-25 04:35:41
问题 I am trying to write PCMU G.711 enocded data into avi multimedia container using below program which yields Error occurred when opening output file: Operation not permitted and when using mov container, it yields Error occurred when opening output file: Invalid argument . I set AV_CODEC_ID_PCM_U16LE as audio codec of output format and AV_SAMPLE_FMT_S16 as sample format. What's the problem here? Thanks in advance! 回答1: You're writing AV_CODEC_ID_PCM_U16LE, which isn't G711, but raw PCM

Memory to memory MOV - Correct Syntax

那年仲夏 提交于 2019-12-24 09:16:41
问题 I'm trying to accomplish the following with ASM: mov [00A30020], [ebx+50] So, I want to mov the value of ebx+50 into 00A30020, but the compiler says it's an invalid statement. 回答1: There is no such thing as a memory to memory move (with mov , there is also move string). See this table. You could load to a temporary register and then store it: mov eax, [ebx+50] mov [00A30020], eax or to avoid using any extra registers at the cost of being inefficient: push dword [ebx+50] pop dword [00A30020]

ARM MOV and MVN operand

喜你入骨 提交于 2019-12-24 02:56:13
问题 I'm trying to write code to do two things: return a 1 to register r2 if my value is presentable as a constant in the ARM data processing instruction. This code does that (offer better methods if it's inefficient please). However, I also want to modify it to tell me whether a MOV or MVN needs to be used. AREA ArmExample18b, CODE ENTRY MOV r2, #0 ;register return value. if =1, representable, otherwise, not representable LDR r1, TABLE1 ;input value we want to use LDR r3, TABLE1+4 ;upper bound

Error “Transparency encoding with auto_alt_ref does not work” when converting a .mov with Alpha to .webm with alpha with ffmpeg

流过昼夜 提交于 2019-12-21 07:24:43
问题 I am trying to convert a .mov file with alpha transparency into a .webm file and have been following this thread for help: Convert mov with Alpha to VP9 Webm with Alpha Using ffmpeg The command line I have been using is ffmpeg -r 24/1 -i Desktop/Skel_Walk_1.mov -c:v libvpx -pix_fmt yuva420p Desktop/Skel_Walk_1.webm However when I go to run the command it comes up with 2 errors Transparency encoding with auto_alt_ref does not work and Error initializing output stream 0:0 -- Error while opening

difference between conditional instructions (cmov) and jump instructions [duplicate]

耗尽温柔 提交于 2019-12-21 03:25:12
问题 This question already has answers here : Why is a conditional move not vulnerable for Branch Prediction Failure? (5 answers) Closed 3 years ago . I'm confused where to use cmov instructions and where to use jump instructions in assembly? From performance point of view: What is the difference in both of them? Which one is better? If possible, please explain their difference with an example. 回答1: movcc is a so-called predicated instruction. That's fancy-speak for "this instruction executes

Understanding partial-register slowdowns from mov instead of movzx instruction [duplicate]

一世执手 提交于 2019-12-20 05:39:17
问题 This question already has answers here : Why doesn't GCC use partial registers? (3 answers) How exactly do partial registers on Haswell/Skylake perform? Writing AL seems to have a false dependency on RAX, and AH is inconsistent (2 answers) Why do x86-64 instructions on 32-bit registers zero the upper part of the full 64-bit register? (2 answers) Closed 2 years ago . I'm very new to assembly language and trying to understand some of its working principles. I read this answer and have a