Category: ACC
-
How to use Visual C++ with Perl
SUMMARY Microsoft Visual C++ and later do not support perl scripts by default. That is, the Developer Studio does not associate any special significance to perl scripts without being informed otherwise. However, there are several viable options, namely custom build rules, which enable the creation of projects that depend directly upon perl scripts. The…
-
PIC 16F88 Microcontroller Servo Controller Project
1) Introduction The goal of this assignment is to control the position of a servomotor by generate pulses on the output pin for a time specified by various voltage of the input pin of the chip. The voltage should also be displayed by a 7-segment LED connected to some output pins of the chip. 2)…
-
Microchip PIC16F88A Emulator Project
Resources: document http://ww1.microchip.com/downloads/en/DeviceDoc/30487c.pdf PIC16F88 resource center http://www.microchip.com/stellent/idcplgidcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010243 MPLAB http:ww1.microchip.com/downloads/en/DeviceDoc/MPLAB710.zip cheat sheet http://ww1.microchip.com/downloads/en/DeviceDoc/51410b.pdf MPASM http://ww1.microchip.com/downloads/en/DeviceDoc/MPASM_&_MPLINK_33014h.pdf USB driver in order to communicate with the board http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm#VCP driving guide of the servo from a robotics project that used the Motorola 68HC11 microcontroller http://www.austincc.edu/rblack/COSC2425/Lectures/Day27/servo.pdf
-
Error 3e6 with WriteFile
It looks like you will get error 3E6 when you call write file with an address not aligned to DWORD. ;===================================================================== ; hello.asm – Example Assembler program ; ; Author: Sheng Jiang ; Course: COSC 2425 ; Date: 5/23/05 ;===================================================================== .386 .MODEL flat, stdcall option casemap:none include windows.inc include kernel32.inc include masm32.inc includelib kernel32.lib includelib masm32.lib .DATA align 1 placeholder byte ?…
-
Lab5 Step4
;=====================================================================; DrawLine.asm – help routine to draw table lines; Author: Sheng_Jiang; Course: COSC 2425; Date: 6/24/05;===================================================================== INCLUDE lab5.inc .Code DrawTableLine PROC USES eax ecx esi, _TableWidth : DWORD, beginChar : BYTE, textBuffer:PTR BYTE, textLen :DWORD, fillChar:BYTE, endChar:BYTE LOCAL printtextlen : DWORD, totalTextLen :DWORD mov eax,_TableWidth sub eax,2 mov totalTextLen,eax ;totalTextLen=_TableWidth-2 .IF(totalTextLen>0) ;beginChar, the left border mov al,beginChar call WriteChar ;cut the text if it is too long ;printtextlen=min(_TableWidth-2,textlen); mov eax,textLen .IF(eax>totalTextLen) mov eax,totalTextLen mov printtextlen,eax ;overflow .ELSE mov printtextlen,eax .ENDIF mov ecx, printtextlen ; print the text part mov esi,textBufferDrawTableLinePrintText: ;if no text left,jump to fill the line jcxz DrawTableLineFillLine mov al,byte ptr [esi] call WriteChar inc esi loop DrawTableLinePrintText DrawTableLineFillLine: ;fill the rest of table line ;will…
-
Lab5 Draft3
reference: http://homepages.ius.edu/jfdoyle/c335/Html/ProcInvoke.htm ;=====================================================================; lab5.asm – build a program that displays the Fibonacci numbers for a user defined input upper bound; Author: Sheng_Jiang; Course: COSC 2425; Date: 6/23/05;===================================================================== .386 option casemap:none INCLUDE Irvine32.inc ; —————————————————————– ; include files that have MASM format prototypes for function calls ; —————————————————————– ; ———————————————— ; Library files that have definitions for function ; exports and tested reliable prebuilt code. ; ———————————————— includelib gdi32.lib includelib user32.lib includelib kernel32.lib includelib Irvine32.lib …
-
Lab5 Draft2
;===================================================================== ; lab5.asm – build a program that displays the Fibonacci numbers for a user defined input upper bound ; Author: Sheng_Jiang ; Course: COSC 2425 ; Date: 6/21/05 ;===================================================================== .386 .MODEL flat, stdcall option casemap:none include windows.inc ; always first include macros.asm ; MASM support macros ; —————————————————————– ; include files that have MASM…
-
Lab4
;===================================================================== ; lab4.asm – Example function call to get the 20th Fibonacci number ;; Author: Sheng_Jiang ; Course: COSC 2425 ; Date: 6/13/05;===================================================================== .386 .MODEL flat, stdcall option casemap:none include windows.inc ; always first include macros.asm ; MASM support macros ; —————————————————————– ; include files that have MASM format prototypes for function calls ; —————————————————————–…
-
Assignment1
;===================================================================== ; Assignment1.asm – Homework Assignment 1 ; ; Author: Sheng_Jiang ; Course: COSC 2425 ; Date: 06/08/05 ;===================================================================== .386 .MODEL flat, stdcall option casemap:none include windows.inc include kernel32.inc include masm32.inc includelib kernel32.lib includelib masm32.lib .DATA ;Playing with flags FlagTest BYTE 0 SFlagTest SBYTE 0 ;Summing up a series of unsigned numbers DWORDArray DWORD 1,2,3,4,5,6,7,8,9,10…
-
Lab3
.386 .MODEL flat, stdcall option casemap:none include windows.inc include kernel32.inc include masm32.inc includelib kernel32.lib includelib masm32.lib .DATA val1 DWORD 10000h val2 DWORD 40000h val3 DWORD 20000h finalVal DWORD ? .CODE main PROC int 3 mov eax,val1 add eax,val2 sub eax,val3 mov finalVal,eax invoke ExitProcess, 0 main ENDP END main # makefile for Lab3 PROJECT…