mov

Assembler mov issue

冷暖自知 提交于 2019-12-20 05:17:13
问题 I have the next code: mov ax,@data mov ds,ax Why I can not write just like this? mov ds,@data All source: .MODEL small .STACK 100h .DATA HelloMessage DB 'Hello, world',13,10,'$' .CODE .startup mov ax,@data mov ds,ax mov ah,9 mov dx,OFFSET HelloMessage int 21h mov ah,4ch int 21h END Thank you! 回答1: You can't, because the instruction set doesn't contain an instruction to do that. It is just one of the many idiosyncrasies of the x86. These kind of restrictions are fairly normal for assembly

ffmpeg: videos before and after conversion aren't the same length

别说谁变了你拦得住时间么 提交于 2019-12-20 03:53:10
问题 I have a set of .mov videos which require conversion to .mp4 format. I'm using ffmpeg and running this command: ffmpeg -i Banking.mov -vsync -async -sameq -ac 1 -ab 64k -ar 44100 Banking.mp4 There is a slight difference between input and output video in time length (00:03:35.407 and 00:03:35.582). And here's the catch - I'm storing time cue set at precise times in a file which is used by a program to point at specific scenes. The 0.1 second difference causes it to point at wrong scenes,

ffmpeg: videos before and after conversion aren't the same length

天涯浪子 提交于 2019-12-20 03:53:05
问题 I have a set of .mov videos which require conversion to .mp4 format. I'm using ffmpeg and running this command: ffmpeg -i Banking.mov -vsync -async -sameq -ac 1 -ab 64k -ar 44100 Banking.mp4 There is a slight difference between input and output video in time length (00:03:35.407 and 00:03:35.582). And here's the catch - I'm storing time cue set at precise times in a file which is used by a program to point at specific scenes. The 0.1 second difference causes it to point at wrong scenes,

LEA & MOV instruction comparision

不羁岁月 提交于 2019-12-20 03:48:07
问题 Instruction 1: LEA DX, MESSAGE ; Move the address of MESSAGE in register DX Instruction 2: MOV DX, OFFSET MESSAGE ; Move the address of MESSAGE in register DX Questions: Are the above instructions equal? They seem to work similarly, but I have just started programming assembly so I can not say. If both of them are similar, then which one of above is the better way to do the above task? Note: I have already read this question 回答1: On my 32-bit system, the instructions match opcodes like this:

Understanding %rip register in intel assembly

余生颓废 提交于 2019-12-19 06:02:25
问题 Concerning the following small code, which was illustrated in another post about the size of structure and all the possibilities to align data correctly : struct { char Data1; short Data2; int Data3; char Data4; } x; unsigned fun ( void ) { x.Data1=1; x.Data2=2; x.Data3=3; x.Data4=4; return(sizeof(x)); } I get the corresponding disassembly (with 64 bits) 0000000000000000 <fun>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: c6 05 00 00 00 00 01 movb $0x1,0x0(%rip) # b <fun+0xb> b: 66 c7 05 00

Understanding %rip register in intel assembly

China☆狼群 提交于 2019-12-19 06:00:03
问题 Concerning the following small code, which was illustrated in another post about the size of structure and all the possibilities to align data correctly : struct { char Data1; short Data2; int Data3; char Data4; } x; unsigned fun ( void ) { x.Data1=1; x.Data2=2; x.Data3=3; x.Data4=4; return(sizeof(x)); } I get the corresponding disassembly (with 64 bits) 0000000000000000 <fun>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: c6 05 00 00 00 00 01 movb $0x1,0x0(%rip) # b <fun+0xb> b: 66 c7 05 00

Assembly: MOVing between two memory addresses

本秂侑毒 提交于 2019-12-17 06:46:22
问题 I'm trying to learn assembly (so bear with me) and I'm getting a compile error on this line: mov byte [t_last], [t_cur] The error is error: invalid combination of opcode and operands I suspect that the cause of this error is simply that its not possible for a mov instruction to move between two memory addresses, but half an hour of googling and I haven't been able to confirm this - is this the case? Also, assuming I'm right that means I need to use a register as an intermediate point for

converted mp4 file using ffmpegvis not playing JW player

不问归期 提交于 2019-12-13 05:32:32
问题 Just i converted mov video file to mp4 file using ffmpeg. But the converted file is not playing JW player. Actual mp4 file videos working fine in all browsers. Thanks for help. 回答1: ffmpeg -i movie.mov -vcodec libx264 -acodec acc -strict experimental -profile:v baseline -f mp4 -y mp4video.mp4 回答2: My ffmpeg conversion comment is correct. But ffmpeg installation is the reason for the issue. I used the following command to convert: ffmpeg -i /uploads/sample.move -acodec libfaac -ab 96k -vcodec

mov instruction in x86 assembly

大城市里の小女人 提交于 2019-12-09 02:37:59
问题 From what I've read about mov , it copies the second argument into the first argument. Then, what does this do? movl 8(%ebp), %edx It copies whatever is in edx to the first parameter of the function (since an offset of +8 from ebp is a parameter)? I feel like what this really means is moving the first parameter into the edx register, but I read on Wikipedia that it is the other way around? 回答1: movl 8(%ebp), %edx is in "AT&T Syntax"; in this syntax, the source comes first and the destination

x86 simple mov instruction

别来无恙 提交于 2019-12-08 12:04:16
问题 This is a simple question but I can't find reliable answers on google. What does this instruction mean: movl %eax, (%esi, %ecx, 4) Is it move the value at register eax to the value in memory that (%esi, %ecx, 4) is pointing too? (%esi, %ecx, 4) is for an array. So it means Array[Xs + 4i] where Xs is the starting point in memory for the Array and i is just an offset in the integer array. 回答1: Exactly correct. This is AT&T syntax, so the source comes first, then the destination. Thus, it stores