The pwd module in standard library of Python provides access to the password database of user accounts in a Unix/Linux operating system. Entries in this Password database are atored as a tuple-like object. The structure of tuple is according to following passwd structure pwd.h file in CPython APIIndexAttributeMeaning0pw_nameLogin name1pw_passwdOptional encrypted password2pw_uidNumerical user ID3pw_gidNumerical group ID4pw_gecosUser name or comment field5pw_dirUser home directory6pw_shellUser command interpreterThe pwd module defines the following functions −>>> import pwd >>> dir(pwd) ['__doc__', '__loader__', '__name__', '__package__', '__spec__', 'getpwall', 'getpwnam', 'getpwuid', 'struct_passwd']getpwnam() − This function returns record in the password database corresponding to the specified user name>>> pwd.getpwnam('root') pwd.struct_passwd(pw_name ... Read More
In 8085 Instruction set, CPE is a mnemonic, which stands for “Call if Parity Even”. This instruction is a used to branch to the subroutine whose 16-bit address is provided in the instruction, only if the P flag value is 1. If the P flag value is 0, program flow continues in the main program sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesCPE LabelEC3Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address20033EMVI A, 40HA ← 40H, Initializing the Accumulator with ... Read More
The dis module in Python standard library provides various functions useful for analysis of Python bytecode by disassembling it into a human-readable form. This helps to perform optimizations. Bytecode is a version-specific implementation detail of the interpreter.dis() functionThe function dis() generates disassembled representation of any Python code source i.e. module, class, method, function, or code object.>>> def hello(): print ("hello world") >>> import dis >>> dis.dis(hello) 2 0 LOAD_GLOBAL 0 (print) 3 LOAD_CONST 1 ('hello world') 6 CALL_FUNCTION 1 (1 positional, 0 keyword pair) 9 POP_TOP 10 LOAD_CONST 0 (None) 13 RETURN_VALUEBytecode ... Read More
In 8085 Instruction set, CP is a mnemonic, which stands for “Call if Positive”. This instruction is used to branch to the subroutine whose 16-bit address is provided in the instruction, only if S flag value is 0. If S flag value is 1, program flow continues in the main program sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesCP LabelF43Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H. Initializing the SP200100Low order Byte of the address200250High order Byte of the address20033EMVI A, 40HA ← 40H, Initializing the Accumulator with initial value 40H20044040H ... Read More
In 8085 Instruction set, CM is a mnemonic, which stands for “Call if Minus”. This instruction is used to branch to the subroutine whose 16-bit address is provided in the instruction, only if S flag value is 1. If S flag value is 0, program flow continues in the main program sequentially. It is a 3-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesCM LabelFC3Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address20033EMVI A, 40HA ← 40H, Initializing the Accumulator with initial value 40H20044040H as ... Read More
In 8085 Instruction set, depending upon one of the flag bit values (excluding AC flag bit), the conditional return instructions will branch the control to the next instruction of the call statement by popping out two return address Bytes (High-Byte and Low-Byte) from the top of the stack. The branch takes place based on the value of Cy flag, Z flag, P flag, or S flag. There is no conditional return instruction based on the value of AC (Auxiliary Carry) flag bit. This is because generally, no one is interested in branching back from the subroutine based on this flag ... Read More
In 8085 Instruction set, RNC is a mnemonic, which stands for “Return if Not Carry”. This instruction is used to return to the main program, only if Cy flag value is 0. If Cy flag value is 1, program flow continues in the subroutine sequentially. It is a 1-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesRNCD01Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address200321LXI H, 4050HHL ← 4050H, Initializing the HL register pair200450Low order Byte of the address200540High order Byte of the address2006CDCALL 200BHCalling ... Read More
In 8085 Instruction set, RPE is a mnemonic, which stands for “Return if Parity Even”. This instruction is used to return to the main program, only if P flag value is 1. If the P flag value is 0, program flow continues in the subroutine sequentially. It is a 1-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesRPEE81Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address200321LXI H, 4050HHL ← 4050H, Initializing the HL register pair200450Low order Byte of the address200540High order Byte of the address2006CDCALL 200BHCalling ... Read More
In 8085 Instruction set, RC is a mnemonic, which stands for “Return if Carry”. This instruction is used to return to the main program, only if Cy flag value is 1. If Cy flag value is 0, program flow continues in the subroutine sequentially. It is a 1-Byte instruction.Mnemonics, OperandOpcode(in HEX)BytesRCD81Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address200321LXI H, 4050HHL ← 4050H, Initializing the HL register pair200450Low order Byte of the address200540High order Byte of the address2006CDCALL 200BHCalling the ... Read More
In 8085 Instruction set, RNZ is a mnemonic, which stands for “Return if Not Zero”. This instruction is used to return to the main program, only if the Z flag value is 0. If Z flag value is 1, program flow continues in the subroutine sequentially. It is a 1-Byte instruction.Mnemonics, OperandOpcode (in HEX)BytesRNZC01Let us consider the following sample code for a better explanation –AddressHex CodesMnemonicComment200031LXI SP, 5000HSP ← 5000H.Initializing the SP200100Low order Byte of the address200250High order Byte of the address200321LXI H, 4050HHL ← 4050H, Initializing the HL register pair200450Low order Byte of the address200540High order Byte of the ... Read More