[S'enregister] - [S'identifier]
gheop wall

yum ?

ASM
par SiB (21/11/07)
Cacher les numéros de lignes
  1. fallen@fixe:~/asm$ cat test.asm
  2. X BIT P1.0
  3. Y BIT P1.1
  4. Z BIT P1.7
  5.  
  6. ORG 0
  7. LJMP debut
  8. ORG 30h
  9.  
  10. debut:
  11. MOV C, Y
  12. ANL C, /X
  13. MOV F0, C
  14. MOV C, X
  15. ANL C, /Y
  16. ORL C, F0
  17. MOV Z, C
  18. fin:
  19. SJMP fin
  20. end
  21.  
  22. fallen@fixe:~/asm$ asem -v test.asm
  23.  
  24. MCS-51 Family Macro Assembler ASEM-51 V1.3
  25.  
  26. no errors
  27.  
  28. fallen@fixe:~/asm$ s51 -t 8051 -p "s51>"
  29. uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  30. uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  31. This is free software, and you are welcome to redistribute it
  32. under certain conditions; type `show c' for details.
  33. 0s51>set bit P1.0 1
  34. 0x90 ff .
  35. 0s51>set bit P1.1 1
  36. 0x90 ff .
  37. 0s51>set bit P1.7 1
  38. 0x90 ff .
  39. 0s51>exec "test.hex"
  40. 1s51>:03000000020030CB
  41. 2147483647
  42. 1s51>:10003000A291B09092D5A290B09172D5929780FE85
  43. 10003000
  44. 1s51>:00000001FF
  45. 1
  46. 1s51>
  47. 0s51>dump F0
  48. PSW.5 0xd0 00 0
  49. 0s51>dump 0xD7
  50. PSW.7 0xd0 00 0
  51. 0s51>dump P1.0
  52. P1.0 0x90 ff 1
  53. 0s51>dump P1.1
  54. P1.1 0x90 ff 1
  55. 0s51>dump P1.7
  56. P1.7 0x90 ff 1